version 1.350, 2006/04/22 17:17:49
|
version 1.352, 2006/04/23 18:31:44
|
Line 76 my %language;
|
Line 76 my %language;
|
my %supported_language; |
my %supported_language; |
my %cprtag; |
my %cprtag; |
my %scprtag; |
my %scprtag; |
my %fe; my %fd; |
my %fe; my %fd; my %fm; |
my %category_extensions; |
my %category_extensions; |
|
|
# ---------------------------------------------- Designs |
# ---------------------------------------------- Designs |
Line 133 BEGIN {
|
Line 133 BEGIN {
|
close($fh); |
close($fh); |
} |
} |
} |
} |
# ------------------------------------------------------------------ source copyrights |
# ----------------------------------------------------------- source copyrights |
{ |
{ |
my $sourcecopyrightfile = $Apache::lonnet::perlvar{'lonIncludes'}. |
my $sourcecopyrightfile = $Apache::lonnet::perlvar{'lonIncludes'}. |
'/source_copyright.tab'; |
'/source_copyright.tab'; |
Line 196 BEGIN {
|
Line 196 BEGIN {
|
while (<$fh>) { |
while (<$fh>) { |
next if (/^\#/); |
next if (/^\#/); |
chomp; |
chomp; |
my ($ending,$emb,$descr)=split(/\s+/,$_,3); |
my ($ending,$emb,$mime,$descr)=split(/\s+/,$_,4); |
if ($descr ne '') { |
if ($descr ne '') { |
$fe{$ending}=lc($emb); |
$fe{$ending}=lc($emb); |
$fd{$ending}=$descr; |
$fd{$ending}=$descr; |
|
if ($mime ne 'unk') { $fm{$ending}=$mime; } |
} |
} |
} |
} |
close($fh); |
close($fh); |
Line 2198 sub fileembstyle {
|
Line 2199 sub fileembstyle {
|
return $fe{lc(shift(@_))}; |
return $fe{lc(shift(@_))}; |
} |
} |
|
|
|
sub filemimetype { |
|
return $fm{lc(shift(@_))}; |
|
} |
|
|
|
|
sub filecategoryselect { |
sub filecategoryselect { |
my ($name,$value)=@_; |
my ($name,$value)=@_; |
Line 3043 sub endbodytag {
|
Line 3048 sub endbodytag {
|
return $endbodytag; |
return $endbodytag; |
} |
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &standard_css() |
|
|
|
Returns a style sheet |
|
|
|
Inputs: (all optional) |
|
domain -> force to color decorate a page for a specific |
|
domain |
|
function -> force usage of a specific rolish color scheme |
|
bgcolor -> override the default page bgcolor |
|
|
|
=back |
|
|
|
=cut |
|
|
sub standard_css { |
sub standard_css { |
my ($function,$domain,$bgcolor) = @_; |
my ($function,$domain,$bgcolor) = @_; |
my $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 $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 $sidebg = &designparm($function.'.sidebg',$domain); |
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); |
my $pgbg = $bgcolor || |
|
&designparm($function.'.pgbg', $domain); |
my $alink = &designparm($function.'.alink',$domain); |
my $alink = &designparm($function.'.alink', $domain); |
my $vlink = &designparm($function.'.vlink',$domain); |
my $vlink = &designparm($function.'.vlink', $domain); |
my $link = &designparm($function.'.link',$domain); |
my $link = &designparm($function.'.link', $domain); |
my $sans = 'Arial,Helvetica,sans-serif'; |
|
my $data_table_head = $tabbg; |
my $sans = 'Arial,Helvetica,sans-serif'; |
my $data_table_light = '#EEEEEE'; |
my $data_table_head = $tabbg; |
my $data_table_dark = '#DDD'; |
my $data_table_light = '#EEEEEE'; |
|
my $data_table_dark = '#DDD'; |
my $data_table_highlight = '#FFFF00'; |
my $data_table_highlight = '#FFFF00'; |
my $mail_new = '#FFBB77'; |
my $mail_new = '#FFBB77'; |
my $mail_new_hover = '#DD9955'; |
my $mail_new_hover = '#DD9955'; |
my $mail_read = '#BBBB77'; |
my $mail_read = '#BBBB77'; |
my $mail_read_hover = '#999944'; |
my $mail_read_hover = '#999944'; |
my $mail_replied = '#AAAA88'; |
my $mail_replied = '#AAAA88'; |
my $mail_replied_hover = '#888855'; |
my $mail_replied_hover = '#888855'; |
my $mail_other = '#99BBBB'; |
my $mail_other = '#99BBBB'; |
my $mail_other_hover = '#669999'; |
my $mail_other_hover = '#669999'; |
|
|
return <<END; |
return <<END; |
<style type="text/css"> |
<style type="text/css"> |
Line 3212 Inputs: $title - optional title for the
|
Line 3236 Inputs: $title - optional title for the
|
$args - optional arguments |
$args - optional arguments |
force_register - if is true call registerurl so the remote is |
force_register - if is true call registerurl so the remote is |
informed |
informed |
redirect - array ref of seconds before redirect occurs |
redirect -> array ref of seconds before redirect occurs |
url to redirect to |
url to redirect to |
(side effect of setting |
(side effect of setting |
$env{'internal.head.redirect'} to the url |
$env{'internal.head.redirect'} to the url |
redirected too) |
redirected too) |
|
domain -> force to color decorate a page for a specific |
|
domain |
|
function -> force usage of a specific rolish color scheme |
|
bgcolor -> override the default page bgcolor |
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 3226 sub headtag {
|
Line 3255 sub headtag {
|
|
|
my $result = |
my $result = |
'<head>'. |
'<head>'. |
&standard_css(). |
&standard_css($args->{'function'},$args->{'domain'}, |
|
$args->{'bgcolor'}). |
&font_settings(). |
&font_settings(). |
&Apache::lonhtmlcommon::htmlareaheaders(); |
&Apache::lonhtmlcommon::htmlareaheaders(); |
|
|
Line 3393 sub start_page {
|
Line 3423 sub start_page {
|
my ($title,$head_extra,$args) = @_; |
my ($title,$head_extra,$args) = @_; |
#&Apache::lonnet::logthis("start_page ".join(':',caller(0))); |
#&Apache::lonnet::logthis("start_page ".join(':',caller(0))); |
my %head_args; |
my %head_args; |
foreach my $arg ('redirect','force_register') { |
foreach my $arg ('redirect','force_register','domain','function', |
|
'bgcolor') { |
if (defined($args->{$arg})) { |
if (defined($args->{$arg})) { |
$head_args{$arg} = $args->{$arg}; |
$head_args{$arg} = $args->{$arg}; |
} |
} |