fixed [ 1265788 ] SyndicatedContent *not working* in 6.7.x

This commit is contained in:
JT Smith 2005-08-23 16:29:51 +00:00
parent 3e587762be
commit 2372905928
4 changed files with 12 additions and 11 deletions

View file

@ -134,14 +134,7 @@ sub toHtml {
WebGUI::Style::setScript($session{config}{extrasURL}.'/calendar/calendar-setup.js',{ type=>'text/javascript' });
WebGUI::Style::setLink($session{config}{extrasURL}.'/calendar/calendar-win2k-1.css', { rel=>"stylesheet", type=>"text/css", media=>"all" });
my $mondayFirst = $session{user}{firstDayOfWeek} ? "true" : "false";
return WebGUI::Form::Text->new(
name=>$self->{name},
value=>$self->{value},
extras=>$self->{extras},
size=>$self->{size},
maxlength=>$self->{maxlength},
id=>$self->{id}
)->toHtml . '<script type="text/javascript">
return $self->SUPER::toHtml. '<script type="text/javascript">
Calendar.setup({
inputField : "'.$self->{id}.'",
ifFormat : "%Y-%m-%d",

View file

@ -117,13 +117,17 @@ sub toHtml {
'months'=>WebGUI::International::get(702),
'years'=>WebGUI::International::get(703));
my ($interval, $units) = WebGUI::DateTime::secondsToInterval($self->{value});
my $out = WebGUI::Form::Integer->new(
# not sure why, but these things need to be defined like this or
# they fail under some circumstnaces
my $cmd = "WebGUI::Form::Integer";
my $out = $cmd->new(
name=>$self->{name}."_interval",
value=>$interval,
extras=>$self->{extras},
id=>$self->{id}."_interval",
)->toHtml;
$out .= WebGUI::Form::SelectList->new(
$cmd = "WebGUI::Form::SelectList";
$out .= $cmd->new(
options=>\%units,
name=>$self->{name}."_units",
id=>$self->{id}."_units",

View file

@ -112,7 +112,10 @@ sub toHtml {
delete $templateList->{$assetId};
}
}
my $selectList = WebGUI::Form::SelectList->new(
# not sure why, but for some reason this fails under certain circumstances unless defined
# in this manner. The syndicated content asset is an example where it fails.
my $cmd = "WebGUI::Form::SelectList";
my $selectList = $cmd->new(
id=>$self->{id},
name=>$self->{name},
options=>$templateList,