version 1.338, 2006/04/14 21:09:51
|
version 1.339, 2006/04/18 19:18:17
|
Line 2770 other decorations will be returned.
|
Line 2770 other decorations will be returned.
|
sub bodytag { |
sub bodytag { |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, |
$notopbar,$bgcolor,$notitle)=@_; |
$notopbar,$bgcolor,$notitle)=@_; |
|
|
$title=&mt($title); |
$title=&mt($title); |
|
|
$function = &get_users_function() if (!$function); |
$function = &get_users_function() if (!$function); |
my $img=&designparm($function.'.img',$domain); |
my $img = &designparm($function.'.img',$domain); |
my $pgbg= $bgcolor || &designparm($function.'.pgbg',$domain); |
my $tabbg = &designparm($function.'.tabbg',$domain); |
my $tabbg=&designparm($function.'.tabbg',$domain); |
my $font = &designparm($function.'.font',$domain); |
my $font=&designparm($function.'.font',$domain); |
my $sidebg = &designparm($function.'.sidebg',$domain); |
my $link=&designparm($function.'.link',$domain); |
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); |
my $alink=&designparm($function.'.alink',$domain); |
|
my $vlink=&designparm($function.'.vlink',$domain); |
my %design = ( 'style' => 'margin-top: 0px', |
my $sidebg=&designparm($function.'.sidebg',$domain); |
'bgcolor' => $pgbg, |
# Accessibility font enhance |
'text' => $font, |
my $addstyle=''; |
'alink' => &designparm($function.'.alink',$domain), |
if ($env{'browser.fontenhance'} eq 'on') { |
'vlink' => &designparm($function.'.vlink',$domain), |
$addstyle=' font-size: x-large;'; |
'link' => &designparm($function.'.link',$domain),); |
} |
@$addentries{keys(%design)} = @design{keys(%design)}; |
|
|
# role and realm |
# role and realm |
my ($role,$realm) |
my ($role,$realm) |
=&Apache::lonnet::plaintext((split(/\./,$env{'request.role'}))[0]); |
=&Apache::lonnet::plaintext((split(/\./,$env{'request.role'}))[0]); |
Line 2813 form, .inline { display: inline; }
|
Line 2816 form, .inline { display: inline; }
|
.center { text-align: center; } |
.center { text-align: center; } |
.filename {font-family: monospace;} |
.filename {font-family: monospace;} |
</style> |
</style> |
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link" |
<body $extra_body_attr> |
style="margin-top: 0px;$addstyle" $extra_body_attr> |
|
END |
END |
|
|
$bodytag .= &Apache::lontexconvert::init_math_support(); |
$bodytag .= &Apache::lontexconvert::init_math_support(); |
Line 2968 sub make_attr_string {
|
Line 2970 sub make_attr_string {
|
} |
} |
|
|
if ($register) { |
if ($register) { |
$attr_ref->{'onload'} = &Apache::lonmenu::loadevents(). |
my ($on_load,$on_unload); |
$attr_ref->{'onload'}; |
foreach my $key (keys(%{$attr_ref})) { |
$attr_ref->{'onunload'} = &Apache::lonmenu::unloadevents(). |
if (lc($key) eq 'onload') { |
$attr_ref->{'onunload'}; |
$on_load.=$attr_ref->{$key}.';'; |
|
delete($attr_ref->{$key}); |
|
|
|
} elsif (lc($key) eq 'onunload') { |
|
$on_unload.=$attr_ref->{$key}.';'; |
|
delete($attr_ref->{$key}); |
|
} |
|
} |
|
$attr_ref->{'onload'} = |
|
&Apache::lonmenu::loadevents(). $on_load; |
|
$attr_ref->{'onunload'}= |
|
&Apache::lonmenu::unloadevents().$on_unload; |
} |
} |
|
|
|
# Accessibility font enhance |
|
if ($env{'browser.fontenhance'} eq 'on') { |
|
my $style; |
|
foreach my $key (keys(%{$attr_ref})) { |
|
if (lc($key) eq 'style') { |
|
$style.=$attr_ref->{$key}.';'; |
|
delete($attr_ref->{$key}); |
|
} |
|
} |
|
$attr_ref->{'style'}=$style.'; font-size: x-large;'; |
|
} |
|
|
|
if ($env{'browser.blackwhite'} eq 'on') { |
|
delete($attr_ref->{'font'}); |
|
delete($attr_ref->{'link'}); |
|
delete($attr_ref->{'alink'}); |
|
delete($attr_ref->{'vlink'}); |
|
delete($attr_ref->{'bgcolor'}); |
|
delete($attr_ref->{'background'}); |
|
} |
|
|
my $attr_string; |
my $attr_string; |
foreach my $attr (keys(%$attr_ref)) { |
foreach my $attr (keys(%$attr_ref)) { |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; |