version 1.806, 2009/05/07 16:25:02
|
version 1.818, 2009/05/16 07:59:09
|
Line 4144 Returns: value of designparamter $which
|
Line 4144 Returns: value of designparamter $which
|
############################################## |
############################################## |
sub designparm { |
sub designparm { |
my ($which,$domain)=@_; |
my ($which,$domain)=@_; |
if ($env{'browser.blackwhite'} eq 'on') { |
|
if ($which=~/\.(font|alink|vlink|link|textcol)$/) { |
|
return '#000000'; |
|
} |
|
if ($which=~/\.(pgbg|sidebg|bgcol)$/) { |
|
return '#FFFFFF'; |
|
} |
|
if ($which=~/\.tabbg$/) { |
|
return '#CCCCCC'; |
|
} |
|
} |
|
if (exists($env{'environment.color.'.$which})) { |
if (exists($env{'environment.color.'.$which})) { |
return $env{'environment.color.'.$which}; |
return $env{'environment.color.'.$which}; |
} |
} |
$domain=&determinedomain($domain); |
$domain=&determinedomain($domain); |
my %domdesign = &get_domainconf($domain); |
my %domdesign = &get_domainconf($domain); |
my $output; |
my $output; |
if ($domdesign{$domain.'.'.$which} ne '') { |
if ($domdesign{$domain.'.'.$which} ne '') { |
$output = $domdesign{$domain.'.'.$which}; |
$output = $domdesign{$domain.'.'.$which}; |
} else { |
} else { |
$output = $defaultdesign{$which}; |
$output = $defaultdesign{$which}; |
} |
} |
if (($which =~ /^(student|coordinator|author|admin)\.img$/) || |
if (($which =~ /^(student|coordinator|author|admin)\.img$/) || |
($which =~ /login\.(img|logo|domlogo|login)/)) { |
($which =~ /login\.(img|logo|domlogo|login)/)) { |
if ($output =~ m{^/(adm|res)/}) { |
if ($output =~ m{^/(adm|res)/}) { |
if ($output =~ m{^/res/}) { |
if ($output =~ m{^/res/}) { |
my $local_name = &Apache::lonnet::filelocation('',$output); |
my $local_name = &Apache::lonnet::filelocation('',$output); |
&Apache::lonnet::repcopy($local_name); |
&Apache::lonnet::repcopy($local_name); |
} |
} |
$output = &lonhttpdurl($output); |
$output = &lonhttpdurl($output); |
} |
} |
} |
} |
Line 4215 Inputs:
|
Line 4204 Inputs:
|
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 |
|
|
=item * $notopbar, if true, keep the 'what is this' info but remove the |
=item * $no_nav_bar, if true, keep the 'what is this' info but remove the |
navigational links |
navigational links |
|
|
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value |
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value |
|
|
=item * $notitle, if true keep the nav controls, but remove the title bar |
|
|
|
=item * $no_inline_link, if true and in remote mode, don't show the |
=item * $no_inline_link, if true and in remote mode, don't show the |
'Switch To Inline Menu' link |
'Switch To Inline Menu' link |
|
|
Line 4242 other decorations will be returned.
|
Line 4229 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,$no_inline_link,$args)=@_; |
$no_nav_bar,$bgcolor,$no_inline_link,$args)=@_; |
|
|
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } |
|
|
Line 4360 ENDROLE
|
Line 4347 ENDROLE
|
.&Apache::lonmenu::constspaceform(); |
.&Apache::lonmenu::constspaceform(); |
} |
} |
|
|
my $titletable; |
my $titletable = '<table id="LC_title_bar">' |
if (!$notitle) { |
."<tr><td> $titleinfo $dc_info</td>".$roleinfo |
$titletable = |
.'</tr></table>'; |
'<table id="LC_title_bar">'. |
|
"<tr><td> $titleinfo $dc_info</td>".$roleinfo. |
if ($no_nav_bar) { |
'</tr></table>'; |
|
} |
|
if ($notopbar) { |
|
$bodytag .= $titletable; |
$bodytag .= $titletable; |
} else { |
} else { |
|
$bodytag .= qq|<div id="LC_nav_bar">$name ($role)<br /> |
|
<em>$realm</em> $dc_info</div>|; |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg, |
$bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg, |
$titletable); |
$titletable); |
Line 4395 ENDROLE
|
Line 4381 ENDROLE
|
my $menu= ($no_inline_link?'' |
my $menu= ($no_inline_link?'' |
:'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>'); |
:'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>'); |
# |
# |
if ($notitle) { |
|
return $bodytag; |
|
} |
|
return(<<ENDBODY); |
return(<<ENDBODY); |
$bodytag |
$bodytag |
<table id="LC_title_bar" class="LC_with_remote"> |
<table id="LC_title_bar" class="LC_with_remote"> |
Line 4450 sub make_attr_string {
|
Line 4433 sub make_attr_string {
|
$attr_ref->{'style'}=$style.'; font-size: x-large;'; |
$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}.'" '; |
Line 4575 a:focus {
|
Line 4549 a:focus {
|
background: yellow |
background: yellow |
} |
} |
|
|
table.thinborder, |
|
table.thinborder tr th { |
|
border-style: solid; |
|
border-width: 1px; |
|
border-color: $lg_border_color; |
|
background: $tabbg; |
|
} |
|
|
|
table.thinborder tr td { |
|
border-style: solid; |
|
border-width: 1px; |
|
border-color: $lg_border_color; |
|
} |
|
|
|
form, .inline { |
form, .inline { |
display: inline; |
display: inline; |
} |
} |
Line 4646 div.LC_confirm_box .LC_success img {
|
Line 4606 div.LC_confirm_box .LC_success img {
|
vertical-align: middle; |
vertical-align: middle; |
} |
} |
|
|
.LC_unknown { |
|
color: yellow; |
|
} |
|
|
|
.LC_icon { |
.LC_icon { |
border: none; |
border: none; |
vertical-align: middle; |
vertical-align: middle; |
} |
} |
|
|
.LC_indexer_icon { |
|
border: none; |
|
height: 22px; |
|
} |
|
|
|
.LC_docs_spacer { |
.LC_docs_spacer { |
width: 25px; |
width: 25px; |
height: 1px; |
height: 1px; |
Line 4721 table#LC_nav_location {
|
Line 4672 table#LC_nav_location {
|
table#LC_title_bar a { |
table#LC_title_bar a { |
color: $fontmenu; |
color: $fontmenu; |
} |
} |
|
|
|
table#LC_title_bar { |
|
/*display: none;*/ |
|
} |
|
|
table#LC_title_bar, |
table#LC_title_bar, |
table.LC_breadcrumbs, |
table.LC_breadcrumbs, |
Line 4884 td.LC_menubuttons_text {
|
Line 4839 td.LC_menubuttons_text {
|
font-weight: bold; |
font-weight: bold; |
} |
} |
|
|
.LC_dropadd_labeltext { |
|
font-family: $sans; |
|
text-align: right; |
|
} |
|
|
|
.LC_preferences_labeltext { |
.LC_preferences_labeltext { |
font-family: $sans; |
font-family: $sans; |
text-align: right; |
text-align: right; |
Line 4902 td.LC_menubuttons_text {
|
Line 4852 td.LC_menubuttons_text {
|
font-weight: bold; |
font-weight: bold; |
} |
} |
|
|
table.LC_aboutme_port { |
|
border: none; |
|
border-collapse: collapse; |
|
border-spacing: 0; |
|
} |
|
|
|
table.LC_data_table, |
table.LC_data_table, |
table.LC_mail_list { |
table.LC_mail_list { |
border: 1px solid #000000; |
border: 1px solid #000000; |
Line 4951 table.LC_data_table tr.LC_info_row > td
|
Line 4895 table.LC_data_table tr.LC_info_row > td
|
} |
} |
|
|
table.LC_data_table tr.LC_odd_row > td, |
table.LC_data_table tr.LC_odd_row > td, |
table.LC_pick_box tr > td.LC_odd_row, |
table.LC_pick_box tr > td.LC_odd_row { |
table.LC_aboutme_port tr td { |
|
background-color: $data_table_light; |
background-color: $data_table_light; |
padding: 2px; |
padding: 2px; |
} |
} |
|
|
table.LC_data_table tr.LC_even_row > td, |
table.LC_data_table tr.LC_even_row > td, |
table.LC_pick_box tr > td.LC_even_row, |
table.LC_pick_box tr > td.LC_even_row { |
table.LC_aboutme_port tr.LC_even_row td { |
|
background-color: $data_table_dark; |
background-color: $data_table_dark; |
padding: 2px; |
padding: 2px; |
} |
} |
Line 5821 ul.LC_TabContent li:hover a {
|
Line 5763 ul.LC_TabContent li:hover a {
|
} |
} |
|
|
h1 { |
h1 { |
padding:5px 10px 5px 20px; |
padding: 0; |
line-height:130%; |
line-height:130%; |
} |
} |
|
|
Line 5874 dl,ul,div,fieldset {
|
Line 5816 dl,ul,div,fieldset {
|
/* overflow: hidden; */ |
/* overflow: hidden; */ |
} |
} |
|
|
|
#LC_nav_bar { |
|
float: left; |
|
margin: 0; |
|
} |
|
|
|
#LC_nav_bar em{ |
|
font-weight: bold; |
|
font-style: normal; |
|
} |
|
|
|
ol.LC_smallMenu { |
|
float: right; |
|
} |
|
|
ol.LC_smallMenu, ol#LC_PathBreadcrumbs { |
ol.LC_smallMenu, ol#LC_PathBreadcrumbs { |
margin: 0; |
margin: 0; |
} |
} |
Line 5894 ol.LC_smallMenu a {
|
Line 5850 ol.LC_smallMenu a {
|
text-decoration: none; |
text-decoration: none; |
} |
} |
|
|
ol#LC_TabMainMenuContent, |
ul#LC_TabMainMenuContent { |
|
clear: both; |
|
color: $fontmenu; |
|
background: $tabbg; |
|
list-style: none; |
|
padding: 0; |
|
margin: 0; |
|
float:left; |
|
width: 100%; |
|
} |
|
|
|
ul#LC_TabMainMenuContent li { |
|
float: left; |
|
font-weight: bold; |
|
line-height: 1.8em; |
|
padding: 0 0.8em; |
|
border-right: 1px solid black; |
|
display: inline; |
|
vertical-align: middle; |
|
} |
|
|
ul.LC_TabContent , |
ul.LC_TabContent , |
ul.LC_TabContentBigger { |
ul.LC_TabContentBigger { |
display:block; |
display:block; |
Line 5903 ul.LC_TabContentBigger {
|
Line 5879 ul.LC_TabContentBigger {
|
padding: 0; |
padding: 0; |
} |
} |
|
|
ol#LC_TabMainMenuContent li, |
|
ul.LC_TabContent li, |
ul.LC_TabContent li, |
ul.LC_TabContentBigger li { |
ul.LC_TabContentBigger li { |
display: inline; |
display: inline; |
Line 5913 ul.LC_TabContentBigger li {
|
Line 5888 ul.LC_TabContentBigger li {
|
white-space:nowrap; |
white-space:nowrap; |
} |
} |
|
|
ol#LC_TabMainMenuContent li { |
ul#LC_TabMainMenuContent li a { |
vertical-align: bottom; |
color: $fontmenu; |
border-bottom: solid 1px RGB(175, 175, 175); |
|
padding: 5px 10px 5px 10px; |
|
margin-right:5px; |
|
margin-bottom:3px; |
|
font-weight: bold; |
|
background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; |
|
} |
|
|
|
ol#LC_TabMainMenuContent li a { |
|
color: RGB(47, 47, 47); |
|
text-decoration: none; |
text-decoration: none; |
} |
} |
|
|
Line 6474 $args - additional optional args support
|
Line 6439 $args - additional optional args support
|
|
|
only_body -> is true will set &bodytag() onlybodytag |
only_body -> is true will set &bodytag() onlybodytag |
arg on |
arg on |
no_nav_bar -> is true will set &bodytag() notopbar arg on |
no_nav_bar -> is true will set &bodytag() no_nav_bar arg on |
add_entries -> additional attributes to add to the <body> |
add_entries -> additional attributes to add to the <body> |
domain -> force to color decorate a page for a |
domain -> force to color decorate a page for a |
specific domain |
specific domain |
Line 6493 $args - additional optional args support
|
Line 6458 $args - additional optional args support
|
is not auto translated like the $title is |
is not auto translated like the $title is |
frameset -> if true will start with a <frameset> |
frameset -> if true will start with a <frameset> |
rather than <body> |
rather than <body> |
no_title -> if true the title bar won't be shown |
|
skip_phases -> hash ref of |
skip_phases -> hash ref of |
head -> skip the <html><head> generation |
head -> skip the <html><head> generation |
body -> skip all <body> generation |
body -> skip all <body> generation |
Line 6542 sub start_page {
|
Line 6506 sub start_page {
|
$args->{'only_body'}, $args->{'domain'}, |
$args->{'only_body'}, $args->{'domain'}, |
$args->{'force_register'}, $args->{'body_title'}, |
$args->{'force_register'}, $args->{'body_title'}, |
$args->{'no_nav_bar'}, $args->{'bgcolor'}, |
$args->{'no_nav_bar'}, $args->{'bgcolor'}, |
$args->{'no_title'}, $args->{'no_inline_link'}, |
$args->{'no_inline_link'}, |
$args); |
$args); |
} |
} |
} |
} |
Line 6554 sub start_page {
|
Line 6518 sub start_page {
|
$result = &html_encode($result); |
$result = &html_encode($result); |
} |
} |
|
|
#Breadcrumbs |
# Preparation for new and consistent functionlist at top of screen |
|
# if ($args->{'functionlist'}) { |
|
# $result .= &build_functionlist(); |
|
#} |
|
|
|
# Don't add anything more if only_body wanted |
|
return $result if $args->{'only_body'}; |
|
|
|
#Breadcrumbs |
if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { |
if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
#if any br links exists, add them to the breadcrumbs |
#if any br links exists, add them to the breadcrumbs |
Line 6798 Returns either 'student','coordinator','
|
Line 6770 Returns either 'student','coordinator','
|
|
|
############################################### |
############################################### |
sub get_users_function { |
sub get_users_function { |
my $function = 'student'; |
my $function = 'norole'; |
|
if ($env{'request.role'}=~/^(st)/) { |
|
$function='student'; |
|
} |
if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { |
if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { |
$function='coordinator'; |
$function='coordinator'; |
} |
} |
Line 10234 sub escape_url {
|
Line 10209 sub escape_url {
|
return join('/',@urlslices).'/'.$lastitem; |
return join('/',@urlslices).'/'.$lastitem; |
} |
} |
|
|
# -------------------------------------------------------- Initliaze user login |
# -------------------------------------------------------- Initialize user login |
sub init_user_environment { |
sub init_user_environment { |
my ($r, $username, $domain, $authhost, $form, $args) = @_; |
my ($r, $username, $domain, $authhost, $form, $args) = @_; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; |
Line 10288 sub init_user_environment {
|
Line 10263 sub init_user_environment {
|
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
$clientunicode,$clientos) = &decode_user_agent($r); |
$clientunicode,$clientos) = &decode_user_agent($r); |
|
|
# -------------------------------------- Any accessibility options to remember? |
|
if (($form->{'interface'}) && ($form->{'remember'} eq 'true')) { |
|
foreach my $option ('imagesuppress','appletsuppress', |
|
'embedsuppress','fontenhance','blackwhite') { |
|
if ($form->{$option} eq 'true') { |
|
&Apache::lonnet::put('environment',{$option => 'on'}, |
|
$domain,$username); |
|
} else { |
|
&Apache::lonnet::del('environment',[$option], |
|
$domain,$username); |
|
} |
|
} |
|
} |
|
# ------------------------------------------------------------- Get environment |
# ------------------------------------------------------------- Get environment |
|
|
my %userenv = &Apache::lonnet::dump('environment',$domain,$username); |
my %userenv = &Apache::lonnet::dump('environment',$domain,$username); |
Line 10318 sub init_user_environment {
|
Line 10280 sub init_user_environment {
|
if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } |
if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } |
|
|
# --------------- Do not trust query string to be put directly into environment |
# --------------- Do not trust query string to be put directly into environment |
foreach my $option ('imagesuppress','appletsuppress', |
foreach my $option ('interface','localpath','localres') { |
'embedsuppress','fontenhance','blackwhite', |
$form->{$option}=~s/[\n\r\=]//gs; |
'interface','localpath','localres') { |
|
$form->{$option}=~s/[\n\r\=]//gs; |
|
} |
} |
# --------------------------------------------------------- Write first profile |
# --------------------------------------------------------- Write first profile |
|
|
Line 10355 sub init_user_environment {
|
Line 10315 sub init_user_environment {
|
$form->{'interface'}=~s/\W//gs; |
$form->{'interface'}=~s/\W//gs; |
$initial_env{"browser.interface"} = $form->{'interface'}; |
$initial_env{"browser.interface"} = $form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
$env{'browser.interface'}=$form->{'interface'}; |
foreach my $option ('imagesuppress','appletsuppress', |
|
'embedsuppress','fontenhance','blackwhite') { |
|
if (($form->{$option} eq 'true') || |
|
($userenv{$option} eq 'on')) { |
|
$initial_env{"browser.$option"} = "on"; |
|
} |
|
} |
|
} |
} |
|
|
foreach my $tool ('aboutme','blog','portfolio') { |
foreach my $tool ('aboutme','blog','portfolio') { |