version 1.329, 2006/04/10 19:54:54
|
version 1.331, 2006/04/11 20:00:44
|
Line 720 sub help_open_menu {
|
Line 720 sub help_open_menu {
|
"<td bgcolor='#CC6600'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>"; |
"<td bgcolor='#CC6600'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>"; |
} |
} |
my $nothing=&Apache::lonhtmlcommon::javascript_nothing(); |
my $nothing=&Apache::lonhtmlcommon::javascript_nothing(); |
my $html=&Apache::lonxml::xmlbegin(); |
|
my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif"); |
my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif"); |
|
my $start_page = |
|
&Apache::loncommon::start_page('Help Menu', undef, |
|
{'frameset' => 1, |
|
'js_ready' => 1, |
|
'add_entries' => { |
|
'border' => '0', |
|
'rows' => "105,*",},}); |
|
my $end_page = |
|
&Apache::loncommon::end_page({'frameset' => 1, |
|
'js_ready' => 1,}); |
|
|
$template .= <<"ENDTEMPLATE"; |
$template .= <<"ENDTEMPLATE"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <!-- BEGIN LON-CAPA Internal |
// <!-- BEGIN LON-CAPA Internal |
Line 745 function helpMenu(target) {
|
Line 755 function helpMenu(target) {
|
return; |
return; |
} |
} |
function writeHelp(caller) { |
function writeHelp(caller) { |
caller.document.writeln('$html<head><title>LON-CAPA Help Menu</title><meta http-equiv="pragma" content="no-cache"></head>') |
caller.document.writeln('$start_page<frame name="bannerframe" src="$banner_link" /><frame name="bodyframe" src="$details_link" /> $end_page') |
caller.document.writeln("<frameset rows='105,*' border='0'><frame name='bannerframe' src='$banner_link'><frame name='bodyframe' src='$details_link'></frameset>") |
|
caller.document.writeln("</html>") |
|
caller.document.close() |
caller.document.close() |
caller.focus() |
caller.focus() |
} |
} |
Line 2786 sub bodytag {
|
Line 2794 sub bodytag {
|
# Port for miniserver |
# Port for miniserver |
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; |
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; |
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
my $extra_body_attr; |
|
if ($forcereg) { |
my $extra_body_attr = &make_attr_string($forcereg,$addentries); |
if (ref($addentries)) { |
|
$addentries->{'onload'} = &Apache::lonmenu::loadevents(). |
|
$addentries->{'onload'}; |
|
$addentries->{'onunload'} = &Apache::lonmenu::unloadevents(). |
|
$addentries->{'onunload'}; |
|
} else { |
|
$extra_body_attr.=' onload="'.&Apache::lonmenu::loadevents(). |
|
'" onunload="'.&Apache::lonmenu::unloadevents().'"'; |
|
} |
|
} |
|
if (!ref($addentries)) { |
|
$extra_body_attr .= $addentries; |
|
} else { |
|
foreach my $attr (keys(%$addentries)) { |
|
$extra_body_attr .= " $attr=\"".$addentries->{$attr}.'" '; |
|
} |
|
} |
|
|
|
# construct main body tag |
# construct main body tag |
my $bodytag = <<END; |
my $bodytag = <<END; |
Line 2820 form, .inline { display: inline; }
|
Line 2811 form, .inline { display: inline; }
|
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link" |
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link" |
style="margin-top: 0px;$addstyle" $extra_body_attr> |
style="margin-top: 0px;$addstyle" $extra_body_attr> |
END |
END |
&Apache::lontexconvert::jsMath_reset(); |
|
if ($env{'environment.texengine'} eq 'jsMath' || |
$bodytag .= &Apache::lontexconvert::init_math_support(); |
$env{'form.texengine'} eq 'jsMath' ) { |
|
$bodytag.=&Apache::lontexconvert::jsMath_header(); |
|
} |
|
|
|
my $upperleft='<img src="http://'.$ENV{'HTTP_HOST'}.':'. |
my $upperleft='<img src="http://'.$ENV{'HTTP_HOST'}.':'. |
$lonhttpdPort.$img.'" alt="'.$function.'" />'; |
$lonhttpdPort.$img.'" alt="'.$function.'" />'; |
Line 2953 $titleinfo $dc_info $menu
|
Line 2941 $titleinfo $dc_info $menu
|
ENDBODY |
ENDBODY |
} |
} |
|
|
|
sub make_attr_string { |
|
my ($register,$attr_ref) = @_; |
|
|
|
if ($attr_ref && !ref($attr_ref)) { |
|
die("addentries Must be a hash ref ". |
|
join(':',caller(1))." ". |
|
join(':',caller(0))." "); |
|
} |
|
|
|
if ($register) { |
|
$attr_ref->{'onload'} = &Apache::lonmenu::loadevents(). |
|
$attr_ref->{'onload'}; |
|
$attr_ref->{'onunload'} = &Apache::lonmenu::unloadevents(). |
|
$attr_ref->{'onunload'}; |
|
} |
|
my $attr_string; |
|
foreach my $attr (keys(%$attr_ref)) { |
|
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
|
} |
|
return $attr_string; |
|
} |
|
|
|
|
############################################### |
############################################### |
############################################### |
############################################### |
|
|
Line 3105 Inputs: $title - optional title for the
|
Line 3116 Inputs: $title - optional title for the
|
body_title -> alternate text to use instead of $title |
body_title -> alternate text to use instead of $title |
in the title box that appears, this text |
in the title box that appears, this text |
is not auto translated like the $title is |
is not auto translated like the $title is |
|
frameset -> if true will start with a <frameset> |
|
rather than <body> |
=back |
=back |
|
|
=cut |
=cut |
Line 3123 sub start_page {
|
Line 3135 sub start_page {
|
$env{'internal.start_page'}++; |
$env{'internal.start_page'}++; |
my $result = |
my $result = |
&Apache::lonxml::xmlbegin(). |
&Apache::lonxml::xmlbegin(). |
&headtag($title,$head_extra,\%head_args).&endheadtag(). |
&headtag($title,$head_extra,\%head_args).&endheadtag(); |
&bodytag($title, |
if ($args->{'frameset'}) { |
$args->{'function'}, $args->{'add_entries'}, |
my $attr_string = &make_attr_string($args->{'force_register'}, |
$args->{'only_body'}, $args->{'domain'}, |
$args->{'add_entries'}); |
$args->{'force_register'}, $args->{'body_title'}, |
$result .= "\n<frameset $attr_string>\n"; |
$args->{'no_nav_bar'}, $args->{'bgcolor'}); |
} else { |
|
$result .= |
|
&bodytag($title, |
|
$args->{'function'}, $args->{'add_entries'}, |
|
$args->{'only_body'}, $args->{'domain'}, |
|
$args->{'force_register'}, $args->{'body_title'}, |
|
$args->{'no_nav_bar'}, $args->{'bgcolor'}); |
|
} |
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
$result = &js_ready($result); |
$result = &js_ready($result); |
} |
} |
Line 3138 sub start_page {
|
Line 3157 sub start_page {
|
return $result; |
return $result; |
} |
} |
|
|
|
|
=pod |
=pod |
|
|
=over 4 |
=over 4 |
Line 3151 Inputs: $args - additional optio
|
Line 3171 Inputs: $args - additional optio
|
a javascript writeln |
a javascript writeln |
html_encode -> return a string ready for being used in |
html_encode -> return a string ready for being used in |
a html attribute |
a html attribute |
|
frameset -> if true will start with a <frameset> |
|
rather than <body> |
=back |
=back |
|
|
=cut |
=cut |
Line 3159 sub end_page {
|
Line 3181 sub end_page {
|
my ($args) = @_; |
my ($args) = @_; |
#&Apache::lonnet::logthis("end_page ".join(':',caller(0))); |
#&Apache::lonnet::logthis("end_page ".join(':',caller(0))); |
$env{'internal.end_page'}++; |
$env{'internal.end_page'}++; |
my $result = &endbodytag()."\n</html>"; |
my $result; |
|
if ($args->{'frameset'}) { |
|
$result .= '</frameset>'; |
|
} else { |
|
$result .= &endbodytag(); |
|
} |
|
$result .= "\n</html>"; |
|
|
if ($args->{'js_ready'}) { |
if ($args->{'js_ready'}) { |
$result = &js_ready($result); |
$result = &js_ready($result); |
} |
} |