📄 project.as
字号:
package com.flexShowcase.data {
//////////////////////////////////////////////////
//import
import com.teknision.utils.DateUtils;
import mx.collections.ArrayCollection;
//////////////////////////////////////////////////
//class
public class Project {
//////////////////////////////////////////////////
//public variables
[Bindable] public var id:uint;
[Bindable] public var name:String;
[Bindable] public var description:String;
[Bindable] public var url:String; //the url of the actual project homepage
[Bindable] public var clientName:String;
[Bindable] public var clientEmail:String;
[Bindable] public var clientURL:String;
[Bindable] public var developerName:String;
[Bindable] public var developerEmail:String;
[Bindable] public var developerURL:String;
[Bindable] public var images:ArrayCollection;
[Bindable] public var thumbnail:String;
[Bindable] public var displayImage:String;
[Bindable] public var tags:ArrayCollection; //a subset of all tag objects that are related to this project
[Bindable] public var technologies:ArrayCollection;
[Bindable] public var industries:ArrayCollection;
[Bindable] public var views:uint; //the number of times this project has been viewed by users specifically selecting the project to be viewed
[Bindable] public var rating:int; //the number of votes a project has received by users
[Bindable] public var numberOfComments:uint; //the number of comments a project currently has
[Bindable] public var published:Boolean; //the user who created the project has the ability to decide whether or not it is published
[Bindable] public var showcaseProject:Boolean; //the flex.org team has the ability to mark a project as a showcase project
[Bindable] public var featuredProject:Boolean; //the flex.org team has the ability to mark a project as a featured project
[Bindable] public var creatorUserID:uint; //the user id of the person who created the project
[Bindable] public var creatorUserName:String; //the user name of the person who created the project
[Bindable] public var createdDate:Date; //the date the project was first stored into drupal
[Bindable] public var lastModifiedDate:Date; //the data that the creator of the project last modified its details
[Bindable] public var viewed:Boolean; //set to true if the user opened the project's details panel
[Bindable] public var voted:Boolean; //set to true if the user submitted a vote so they can't vote more than once per visit
//////////////////////////////////////////////////
//constructor
public function Project():void {
}
//////////////////////////////////////////////////
//public functions
public function getFormattedCreatedDate():String {
var ordinalDay:String = DateUtils.getOrdinalNumber(createdDate).toUpperCase();
var verbalMonth:String = DateUtils.getVerbalMonth(createdDate).toUpperCase();
var formattedDate:String = verbalMonth + " " + ordinalDay + ", " + createdDate.getFullYear();
return formattedDate;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -