Reformatted Calendar wobject to more closely conform to WGPB. Fixed a bug or two while I was at it.

This commit is contained in:
Doug Bell 2007-01-30 15:07:03 +00:00
parent 3625526909
commit 83dbcf63e9
3 changed files with 24 additions and 24 deletions

View file

@ -44,11 +44,10 @@ use JSON;
####################################################################
sub definition
{
my $class = shift;
my $session = shift;
my $definition = shift || [];
sub definition {
my $class = shift;
my $session = shift;
my $definition = shift || [];
my $i18n = WebGUI::International->new($session, 'Asset_Calendar');

View file

@ -866,6 +866,7 @@ sub www_editTask {
$startEpoch = $endEpoch = time unless defined $startEpoch and defined $endEpoch;
$startEpoch = $task->{startDate} if $task->{startDate};
$endEpoch = $task->{endDate} if $task->{endDate};
## Magic number = bad
$endEpoch += 86400 if $taskType eq 'timed' and !$task->{duration} and !$task->{endDate};
my ($start, $end) = ($dt->epochToSet($startEpoch), $dt->epochToSet($endEpoch));
@ -999,7 +1000,7 @@ sub www_editTask {
$var->{'task_resource_label'} = $i18n->get('task resource label');
$var->{'task_save_label'} = $i18n->get('task save label');
return $self->processTemplate($var,$self->getValue("editTaskTemplateId"))
return $self->processTemplate($var,$self->getValue("editTaskTemplateId"));
}
#-------------------------------------------------------------------