Merging changes from 6.6.4

Added new definition features to wobjects and assets.
This commit is contained in:
JT Smith 2005-07-21 01:17:05 +00:00
parent 3805ebed23
commit c4b3e4092d
43 changed files with 457 additions and 717 deletions

View file

@ -38,12 +38,13 @@ use WebGUI::Asset::Wobject::EventsCalendar;
our @ISA = qw(WebGUI::Asset);
#-------------------------------------------------------------------
sub definition {
my $class = shift;
my $definition = shift;
push(@{$definition}, {
assetName=>WebGUI::International::get(511,"Asset_Event"),
icon=>'calendar.gif',
tableName=>'EventsCalendar_event',
className=>'WebGUI::Asset::Event',
properties=>{
@ -325,20 +326,6 @@ sub getEditForm {
#-------------------------------------------------------------------
sub getIcon {
my $self = shift;
my $small = shift;
return $session{config}{extrasURL}.'/assets/small/calendar.gif' if ($small);
return $session{config}{extrasURL}.'/assets/calendar.gif';
}
#-------------------------------------------------------------------
sub getName {
return WebGUI::International::get(511,"Asset_Event");
}
#-------------------------------------------------------------------
sub processPropertiesFromFormPost {
@ -381,6 +368,25 @@ sub processPropertiesFromFormPost {
}
#-------------------------------------------------------------------
=head setParent ( newParent )
We're overloading the setParent in Asset because we don't want events to be able to be posted to anything other than the events calendar.
=head3 newParent
An asset object to make the parent of this asset.
=cut
sub setParent {
my $self = shift;
my $newParent = shift;
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Wobject::EventsCalendar");
return $self->SUPER::setParent($newParent);
}
#-------------------------------------------------------------------
sub view {
my $self = shift;