Begin to convert Event to Moose.
This commit is contained in:
parent
4089e39d58
commit
e4e6b84f08
1 changed files with 59 additions and 58 deletions
|
|
@ -27,7 +27,65 @@ use WebGUI::Form;
|
||||||
use WebGUI::Storage;
|
use WebGUI::Storage;
|
||||||
use Storable;
|
use Storable;
|
||||||
|
|
||||||
use base 'WebGUI::Asset';
|
use WebGUI::Definition::Asset;
|
||||||
|
extends 'WebGUI::Asset';
|
||||||
|
aspect assetName => ['assetName', 'Asset_Event'];
|
||||||
|
aspect icon => 'calendar.gif';
|
||||||
|
aspect tableName => 'Event';
|
||||||
|
property description => (
|
||||||
|
fieldType => "HTMLArea",
|
||||||
|
defaultValue => "",
|
||||||
|
);
|
||||||
|
property startDate => (
|
||||||
|
fieldType => "Date",
|
||||||
|
defaultValue => $dt->toMysqlDate,
|
||||||
|
);
|
||||||
|
property endDate => (
|
||||||
|
fieldType => "Date",
|
||||||
|
defaultValue => $dt->toMysqlDate,
|
||||||
|
);
|
||||||
|
property startTime => (
|
||||||
|
fieldType => "TimeField",
|
||||||
|
defaultValue => undef,
|
||||||
|
format => 'mysql',
|
||||||
|
);
|
||||||
|
property endTime => (
|
||||||
|
fieldType => "TimeField",
|
||||||
|
defaultValue => undef,
|
||||||
|
format => 'mysql',
|
||||||
|
);
|
||||||
|
|
||||||
|
property recurId => (
|
||||||
|
fieldType => "Text",
|
||||||
|
defaultValue => undef,
|
||||||
|
);
|
||||||
|
|
||||||
|
property location => (
|
||||||
|
fieldType => "Text",
|
||||||
|
defaultValue => undef,
|
||||||
|
);
|
||||||
|
property feedId => (
|
||||||
|
fieldType => "Text",
|
||||||
|
defaultValue => undef,
|
||||||
|
);
|
||||||
|
property storageId => (
|
||||||
|
fieldType => "Image",
|
||||||
|
defaultValue => '',
|
||||||
|
maxAttachments => 1,
|
||||||
|
);
|
||||||
|
property feedUid => (
|
||||||
|
fieldType => "Text",
|
||||||
|
defaultValue => undef,
|
||||||
|
);
|
||||||
|
property timeZone => (
|
||||||
|
fieldType => 'TimeZone',
|
||||||
|
);
|
||||||
|
property sequenceNumber => (
|
||||||
|
fieldType => 'hidden',
|
||||||
|
);
|
||||||
|
property iCalSequenceNumber => (
|
||||||
|
fieldType => 'hidden',
|
||||||
|
);
|
||||||
|
|
||||||
use WebGUI::DateTime;
|
use WebGUI::DateTime;
|
||||||
|
|
||||||
|
|
@ -93,60 +151,6 @@ sub definition {
|
||||||
%properties = (
|
%properties = (
|
||||||
|
|
||||||
##### DEFAULTS #####
|
##### DEFAULTS #####
|
||||||
'description' => {
|
|
||||||
fieldType => "HTMLArea",
|
|
||||||
defaultValue => "",
|
|
||||||
},
|
|
||||||
'startDate' => {
|
|
||||||
fieldType => "Date",
|
|
||||||
defaultValue => $dt->toMysqlDate,
|
|
||||||
},
|
|
||||||
'endDate' => {
|
|
||||||
fieldType => "Date",
|
|
||||||
defaultValue => $dt->toMysqlDate,
|
|
||||||
},
|
|
||||||
'startTime' => {
|
|
||||||
fieldType => "TimeField",
|
|
||||||
defaultValue => undef,
|
|
||||||
format => 'mysql',
|
|
||||||
},
|
|
||||||
'endTime' => {
|
|
||||||
fieldType => "TimeField",
|
|
||||||
defaultValue => undef,
|
|
||||||
format => 'mysql',
|
|
||||||
},
|
|
||||||
|
|
||||||
'recurId' => {
|
|
||||||
fieldType => "Text",
|
|
||||||
defaultValue => undef,
|
|
||||||
},
|
|
||||||
|
|
||||||
'location' => {
|
|
||||||
fieldType => "Text",
|
|
||||||
defaultValue => undef,
|
|
||||||
},
|
|
||||||
'feedId' => {
|
|
||||||
fieldType => "Text",
|
|
||||||
defaultValue => undef,
|
|
||||||
},
|
|
||||||
'storageId' => {
|
|
||||||
fieldType => "Image",
|
|
||||||
defaultValue => '',
|
|
||||||
maxAttachments => 1,
|
|
||||||
},
|
|
||||||
'feedUid' => {
|
|
||||||
fieldType => "Text",
|
|
||||||
defaultValue => undef,
|
|
||||||
},
|
|
||||||
'timeZone' => {
|
|
||||||
fieldType => 'TimeZone',
|
|
||||||
},
|
|
||||||
sequenceNumber => {
|
|
||||||
fieldType => 'hidden',
|
|
||||||
},
|
|
||||||
iCalSequenceNumber => {
|
|
||||||
fieldType => 'hidden',
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -160,9 +164,6 @@ sub definition {
|
||||||
|
|
||||||
|
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
assetName => $i18n->get('assetName'),
|
|
||||||
icon => 'calendar.gif',
|
|
||||||
tableName => 'Event',
|
|
||||||
className => 'WebGUI::Asset::Event',
|
className => 'WebGUI::Asset::Event',
|
||||||
properties => \%properties
|
properties => \%properties
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue