--- loncom/interface/loncommon.pm 2009/04/25 20:22:07 1.796 +++ loncom/interface/loncommon.pm 2009/05/04 19:35:31 1.801 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.796 2009/04/25 20:22:07 www Exp $ +# $Id: loncommon.pm,v 1.801 2009/05/04 19:35:31 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -517,6 +517,10 @@ sub coursebrowser_javascript { else { if (formname == 'portform') { url += '&setroles='+extra_element; + } else { + if (formname == 'rules') { + url += '&fixeddom='+extra_element; + } } } } @@ -931,9 +935,6 @@ sub help_open_topic { my ($topic, $text, $stayOnPage, $width, $height) = @_; $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'browser.interface'} eq 'textual') { - $stayOnPage=1; - } $width = 350 if (not defined $width); $height = 400 if (not defined $height); my $filename = $topic; @@ -1039,8 +1040,7 @@ sub help_open_menu { $stayOnPage = 0 if (not defined $stayOnPage); # only use pop-up help (stayOnPage == 0) # if environment.remote is on (using remote control UI) - if ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ) { + if ($env{'environment.remote'} eq 'off' ) { $stayOnPage=1; } my $output; @@ -1064,8 +1064,7 @@ sub top_nav_help { my ($text) = @_; $text = &mt($text); my $stay_on_page = - ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ); + ($env{'environment.remote'} eq 'off' ); my $link = ($stay_on_page) ? "javascript:helpMenu('display')" : "javascript:helpMenu('open')"; my $banner_link = &update_help_link(undef,undef,undef,undef,$stay_on_page); @@ -1082,8 +1081,7 @@ sub help_menu_js { my ($text) = @_; my $stayOnPage = - ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ); + ($env{'environment.remote'} eq 'off' ); my $width = 620; my $height = 600; @@ -1142,8 +1140,7 @@ sub help_open_bug { unless ($Apache::lonnet::perlvar{'BugzillaHost'}) { return ''; } $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ) { + if ($env{'environment.remote'} eq 'off' ) { $stayOnPage=1; } $width = 600 if (not defined $width); @@ -1187,8 +1184,7 @@ sub help_open_faq { unless ($Apache::lonnet::perlvar{'FAQHost'}) { return ''; } $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ) { + if ($env{'environment.remote'} eq 'off' ) { $stayOnPage=1; } $width = 350 if (not defined $width); @@ -4268,15 +4264,7 @@ sub bodytag { if ($bodyonly) { return $bodytag; - } elsif ($env{'browser.interface'} eq 'textual') { -# Accessibility - - $bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg); - if (!$notitle) { - $bodytag.='

LON-CAPA: '.$title.'

'; - } - return $bodytag; - } + } my $name = &plainname($env{'user.name'},$env{'user.domain'}); if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') { @@ -4508,6 +4496,7 @@ sub standard_css { my $img = &designparm($function.'.img', $domain); my $tabbg = &designparm($function.'.tabbg', $domain); my $font = &designparm($function.'.font', $domain); + my $fontmenu = &designparm($function.'.fontmenu', $domain); #second colour for later usage my $sidebg = &designparm($function.'.sidebg',$domain); my $pgbg_or_bgcolor = @@ -4694,6 +4683,10 @@ table#LC_nav_location { padding: 0px; } +table#LC_title_bar a { + color: $fontmenu; +} + table#LC_title_bar, table.LC_breadcrumbs, table#LC_title_bar.LC_with_remote { @@ -4702,6 +4695,7 @@ table#LC_title_bar.LC_with_remote { border-style: solid; border-width: $border; background: $pgbg; + color: $fontmenu; font-family: $sans; border-collapse: collapse; padding: 0px; @@ -4722,7 +4716,7 @@ table#LC_title_bar td { table#LC_title_bar .LC_title_bar_who { background: $tabbg; - color: $font; + color: $fontmenu; font: small $sans; text-align: right; margin: 0px; @@ -4787,7 +4781,7 @@ table#LC_top_nav td.LC_top_nav_login { table.LC_breadcrumbs td, table.LC_docs_path td { background: $tabbg; - color: $font; + color: $fontmenu; font-family: $sans; font-size: smaller; } @@ -4795,7 +4789,7 @@ table.LC_docs_path td { table.LC_breadcrumbs td.LC_breadcrumbs_component, table.LC_docs_path td.LC_docs_path_component { background: $tabbg; - color: $font; + color: $fontmenu; font-family: $sans; font-size: larger; text-align: right; @@ -4911,6 +4905,7 @@ table.LC_mail_list tr th, table.LC_prior_tries tr th { font-weight: bold; background-color: $data_table_head; + color:$fontmenu; font-size:90%; } @@ -4958,6 +4953,7 @@ table.LC_nested tr.LC_empty_row td { table.LC_nested_outer tr th { font-weight: bold; + color:$fontmenu; background-color: $data_table_head; font-size: small; border-bottom: 1px solid #000000; @@ -5437,7 +5433,7 @@ table.LC_prior_tries td { } .LC_answer_charged_try { - background: lightred; + background: #FFAAAA; font-family: $sans; color: darkred; padding: 6px; @@ -5809,6 +5805,7 @@ h2,h3,h4,h5,h6 { padding:3px 15px 3px 15px; margin:0px; background-color:$tabbg; + color:$fontmenu; border-bottom:solid 1px $lg_border_color; } @@ -7485,12 +7482,17 @@ sub user_picker { if ($cancreate) { $new_user_create = '

&"').'" onclick="javascript:setSearch(\'1\','.$caller.');" />

'; } else { - my $helplink = ' href="javascript:helpMenu('."'display'".')"'; + my $helplink = 'javascript:helpMenu('."'display'".')'; my %usertypetext = ( official => 'institutional', unofficial => 'non-institutional', ); - $new_user_create = '
'.&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '.&mt('Contact the helpdesk for assistance.',$helplink).'

'; + $new_user_create = '

' + .&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.") + .' ' + .&mt('Please contact the [_1]helpdesk[_2] for assistance.' + ,'','') + .'


'; } } }