1 //
  2 // The Antville Project
  3 // http://code.google.com/p/antville
  4 //
  5 // Copyright 2001-2007 by The Antville People
  6 //
  7 // Licensed under the Apache License, Version 2.0 (the ``License'');
  8 // you may not use this file except in compliance with the License.
  9 // You may obtain a copy of the License at
 10 //
 11 //    http://www.apache.org/licenses/LICENSE-2.0
 12 //
 13 // Unless required by applicable law or agreed to in writing, software
 14 // distributed under the License is distributed on an ``AS IS'' BASIS,
 15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16 // See the License for the specific language governing permissions and
 17 // limitations under the License.
 18 //
 19 // $Revision$
 20 // $LastChangedBy$
 21 // $LastChangedDate$
 22 // $URL$
 23 //
 24 
 25 /**
 26  * @fileOverview Defines the Vote prototype.
 27  */
 28 
 29 markgettext("Vote");
 30 markgettext("vote");
 31 
 32 /**
 33  * @name Vote
 34  * @constructor
 35  * @param {Choice} choice
 36  * @property {Choice} choice
 37  * @property {Date} created
 38  * @property {User} creator
 39  * @property {String} creator_name
 40  * @property {Date} modified
 41  * @property {Poll} poll
 42  * @extends HopObject
 43  */
 44 Vote.prototype.constructor = function(choice) {
 45    this.choice = choice;
 46    this.creator = session.user;
 47    this.creator_name = session.user.name;
 48    this.created = this.modified = new Date;
 49    return this;
 50 }
 51