version 1.226, 2009/07/02 17:22:33
|
version 1.229, 2009/08/10 12:32:34
|
Line 505 ENDJS
|
Line 505 ENDJS
|
unshift(@Months,'If you can read this an error occurred'); |
unshift(@Months,'If you can read this an error occurred'); |
if ($includeempty) { $monthselector.="<option value=''></option>"; } |
if ($includeempty) { $monthselector.="<option value=''></option>"; } |
for(my $m = 1;$m <=$#Months;$m++) { |
for(my $m = 1;$m <=$#Months;$m++) { |
$monthselector .= qq{ <option value="$m" }; |
$monthselector .= qq{ <option value="$m"}; |
$monthselector .= "selected " if ($m-1 eq $month); |
$monthselector .= ' selected="selected"' if ($m-1 eq $month); |
$monthselector .= '> '.&mt($Months[$m]).' </option>'; |
$monthselector .= '> '.&mt($Months[$m]).' </option>'."\n"; |
} |
} |
$monthselector.= ' </select>'; |
$monthselector.= ' </select>'; |
# Day |
# Day |
Line 520 ENDJS
|
Line 520 ENDJS
|
$hourselector.=qq{<option value=''></option>}; |
$hourselector.=qq{<option value=''></option>}; |
} |
} |
for (my $h = 0;$h<24;$h++) { |
for (my $h = 0;$h<24;$h++) { |
$hourselector .= qq{<option value="$h" }; |
$hourselector .= qq{<option value="$h"}; |
$hourselector .= "selected " if (defined($hour) && $hour == $h); |
$hourselector .= ' selected="selected"' if (defined($hour) && $hour == $h); |
$hourselector .= ">"; |
$hourselector .= ">"; |
my $timest=''; |
my $timest=''; |
if ($h == 0) { |
if ($h == 0) { |
Line 1435 returns: nothing
|
Line 1435 returns: nothing
|
unless ($CourseBreadcrumbs) { |
unless ($CourseBreadcrumbs) { |
$links = htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
$links = htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" }); |
} else { |
} else { |
$links = htmltag('ul', $links, { id => "LC_CourseBreadcrumbs" }); |
$links = htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" }); |
} |
} |
|
|
if ($component) { |
if ($component) { |
Line 2117 sub inittags {
|
Line 2117 sub inittags {
|
} |
} |
|
|
|
|
|
# USAGE: scripttag(scriptcode, true/false); |
|
# |
|
# EXAMPLES: |
|
# - scripttag("alert('Hello World!')") |
|
# |
|
# NOTES: |
|
# - works currently only for javascripts |
|
# |
|
# OUTPUT: Scriptcode properly enclosed in <script> and CDATA tags (and LC |
|
# Internal markers if 2nd argument evaluates to true) |
|
sub scripttag { |
|
my ($content, $internal) = @_; |
|
$content = "// BEGIN LON-CAPA Internal\n$content\n// END LON-CAPA Internal" if $internal; |
|
$content = "\n// <![CDATA[\n$content\n// ]]>\n"; |
|
htmltag("script", $content, {type => "text/javascript"}); |
|
return htmltag("script", $content, {type => "text/javascript"}); |
|
}; |
|
|
|
|
############################################## |
############################################## |
############################################## |
############################################## |
|
|