version 1.121, 2006/02/22 19:22:49
|
version 1.126, 2006/05/01 19:07:16
|
Line 524 sub get_date_from_form {
|
Line 524 sub get_date_from_form {
|
if (($year<70) || ($year>137)) { return undef; } |
if (($year<70) || ($year>137)) { return undef; } |
if (defined($sec) && defined($min) && defined($hour) && |
if (defined($sec) && defined($min) && defined($hour) && |
defined($day) && defined($month) && defined($year) && |
defined($day) && defined($month) && defined($year) && |
eval(&timelocal($sec,$min,$hour,$day,$month,$year))) { |
eval('&timelocal($sec,$min,$hour,$day,$month,$year)')) { |
return &timelocal($sec,$min,$hour,$day,$month,$year); |
return &timelocal($sec,$min,$hour,$day,$month,$year); |
} else { |
} else { |
return undef; |
return undef; |
Line 803 sub Create_PrgWin {
|
Line 803 sub Create_PrgWin {
|
$prog_state{'type'}=$type; |
$prog_state{'type'}=$type; |
if ($type eq 'popup') { |
if ($type eq 'popup') { |
$prog_state{'window'}='popwin'; |
$prog_state{'window'}='popwin'; |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page = |
|
&Apache::loncommon::start_page($title,undef, |
|
{'only_body' => 1, |
|
'bgcolor' => '#88DDFF', |
|
'js_ready' => 1}); |
|
my $end_page = &Apache::loncommon::end_page({'js_ready' => 1}); |
|
|
#the whole function called through timeout is due to issues |
#the whole function called through timeout is due to issues |
#in mozilla Read BUG #2665 if you want to know the whole story |
#in mozilla Read BUG #2665 if you want to know the whole story |
&r_print($r,'<script>'. |
&r_print($r,'<script type="text/javascript">'. |
"var popwin; |
"var popwin; |
function openpopwin () { |
function openpopwin () { |
popwin=open(\'\',\'popwin\',\'width=400,height=100\');". |
popwin=open(\'\',\'popwin\',\'width=400,height=100\');". |
"popwin.document.writeln(\'".$html."<head><title>$title</title></head>". |
"popwin.document.writeln(\'".$start_page. |
"<body bgcolor=\"#88DDFF\">". |
|
"<h4>$heading</h4>". |
"<h4>$heading</h4>". |
"<form name=popremain>". |
"<form name=popremain>". |
'<input type="text" size="'.$width.'" name="remaining" value="'. |
'<input type="text" size="'.$width.'" name="remaining" value="'. |
&mt('Starting').'"></form>'. |
&mt('Starting').'"></form>'.$end_page. |
"</body></html>\');". |
"\');". |
"popwin.document.close();}". |
"popwin.document.close();}". |
"\nwindow.setTimeout(openpopwin,0)</script>"); |
"\nwindow.setTimeout(openpopwin,0)</script>"); |
$prog_state{'formname'}='popremain'; |
$prog_state{'formname'}='popremain'; |
Line 974 sub crumbs {
|
Line 979 sub crumbs {
|
# --------------------- A function that generates a window for the spellchecker |
# --------------------- A function that generates a window for the spellchecker |
|
|
sub spellheader { |
sub spellheader { |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page= |
|
&Apache::loncommon::start_page('Speller Suggestions',undef, |
|
{'only_body' => 1, |
|
'js_ready' => 1, |
|
'bgcolor' => '#DDDDDD',}); |
|
my $end_page= |
|
&Apache::loncommon::end_page({'js_ready' => 1}); |
|
|
my $nothing=&javascript_nothing(); |
my $nothing=&javascript_nothing(); |
return (<<ENDCHECK); |
return (<<ENDCHECK); |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 983 var checkwin;
|
Line 995 var checkwin;
|
|
|
function spellcheckerwindow() { |
function spellcheckerwindow() { |
checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
checkwin.document.writeln('$html<head></head><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>'); |
checkwin.document.writeln('$start_page<form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form>$end_page'); |
checkwin.document.close(); |
checkwin.document.close(); |
} |
} |
// END LON-CAPA Internal --> |
// END LON-CAPA Internal --> |
Line 1003 ENDLINK
|
Line 1015 ENDLINK
|
|
|
# ------------------------------------------------- Output headers for HTMLArea |
# ------------------------------------------------- Output headers for HTMLArea |
|
|
|
{ |
|
my @htmlareafields; |
|
sub init_htmlareafields { |
|
undef(@htmlareafields); |
|
} |
|
|
|
sub add_htmlareafields { |
|
my (@newfields) = @_; |
|
push(@htmlareafields,@newfields); |
|
} |
|
|
|
sub get_htmlareafields { |
|
return @htmlareafields; |
|
} |
|
} |
|
|
sub htmlareaheaders { |
sub htmlareaheaders { |
if (&htmlareablocked()) { return ''; } |
if (&htmlareablocked()) { return ''; } |
unless (&htmlareabrowser()) { return ''; } |
unless (&htmlareabrowser()) { return ''; } |
Line 1137 returns: nothing
|
Line 1165 returns: nothing
|
my @Crumbs; |
my @Crumbs; |
|
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($color,$component,$component_help,$function,$domain,$menulink, |
my (undef,$component,$component_help,undef,undef,$menulink, |
$helplink) = @_; |
$helplink) = @_; |
if (! defined($color)) { |
|
if (! defined($function)) { |
|
$function = &Apache::loncommon::get_users_function(); |
|
} |
|
$color = &Apache::loncommon::designparm($function.'.tabbg', |
|
$domain); |
|
} |
|
# |
# |
my $Str = "\n". |
my $Str = "\n".'<table id="LC_breadcrumbs"><tr><td>'; |
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'. |
|
'<tr><td bgcolor="'.$color.'">'. |
|
'<font size="-1">'; |
|
# |
# |
# Make the faq and bug data cascade |
# Make the faq and bug data cascade |
my $faq = ''; |
my $faq = ''; |
Line 1205 returns: nothing
|
Line 1223 returns: nothing
|
# $icons .= &Apache::loncommon::help_open_bug($bug); |
# $icons .= &Apache::loncommon::help_open_bug($bug); |
# } |
# } |
if ($helplink ne 'nohelp') { |
if ($helplink ne 'nohelp') { |
$icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug); |
$icons .= &Apache::loncommon::help_open_menu(undef,$component, |
|
$component_help, |
|
undef,$faq,$bug); |
} |
} |
if ($icons ne '') { |
if ($icons ne '') { |
$Str .= $icons.' '; |
$Str .= $icons.' '; |
} |
} |
# |
# |
$Str .= $links.'</font></td>'; |
$Str .= $links.'</td>'; |
# |
# |
if (defined($component)) { |
if (defined($component)) { |
$Str .= '<td align="right" bgcolor="'.$color.'">'. |
$Str .= '<td class="LC_breadcrumb_component">'. |
'<font size="+1">'.&mt($component).'</font></td>'; |
&mt($component).'</td>'; |
} |
} |
$Str .= '</tr></table>'."\n"; |
$Str .= '</tr></table>'."\n"; |
# |
# |