2007-06-23 14:53:39 +00:00
|
|
|
|
// The Antville Project
|
|
|
|
|
// http://code.google.com/p/antville
|
|
|
|
|
//
|
2011-02-23 16:24:32 +00:00
|
|
|
|
// Copyright 2007-2011 by Tobi Schäfer.
|
|
|
|
|
//
|
|
|
|
|
// Copyright 2001–2007 Robert Gaggl, Hannes Wallnöfer, Tobi Schäfer,
|
|
|
|
|
// Matthias & Michael Platzer, Christoph Lincke.
|
2007-06-23 14:53:39 +00:00
|
|
|
|
//
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
//
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
//
|
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
|
|
|
|
//
|
|
|
|
|
// $Revision$
|
|
|
|
|
// $LastChangedBy$
|
|
|
|
|
// $LastChangedDate$
|
|
|
|
|
// $URL$
|
|
|
|
|
|
2009-11-02 16:16:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* @fileOverview Defines the Vote prototype.
|
|
|
|
|
*/
|
|
|
|
|
|
2010-05-24 13:32:40 +00:00
|
|
|
|
markgettext("Vote");
|
|
|
|
|
markgettext("vote");
|
|
|
|
|
|
2009-11-02 16:16:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* @name Vote
|
|
|
|
|
* @constructor
|
|
|
|
|
* @param {Choice} choice
|
|
|
|
|
* @property {Choice} choice
|
|
|
|
|
* @property {Date} created
|
|
|
|
|
* @property {User} creator
|
|
|
|
|
* @property {String} creator_name
|
|
|
|
|
* @property {Date} modified
|
|
|
|
|
* @property {Poll} poll
|
|
|
|
|
* @extends HopObject
|
|
|
|
|
*/
|
2007-10-04 18:48:35 +00:00
|
|
|
|
Vote.prototype.constructor = function(choice) {
|
2007-06-23 14:53:39 +00:00
|
|
|
|
this.choice = choice;
|
2007-10-04 18:48:35 +00:00
|
|
|
|
this.creator = session.user;
|
|
|
|
|
this.creator_name = session.user.name;
|
|
|
|
|
this.created = this.modified = new Date;
|
2007-06-23 14:53:39 +00:00
|
|
|
|
return this;
|
2008-04-21 13:57:01 +00:00
|
|
|
|
}
|