--- loncom/interface/lonmenu.pm 2006/04/21 20:45:42 1.176 +++ loncom/interface/lonmenu.pm 2006/05/15 16:23:58 1.181 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.176 2006/04/21 20:45:42 albertel Exp $ +# $Id: lonmenu.pm,v 1.181 2006/05/15 16:23:58 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -64,22 +64,6 @@ sub initlittle { 'groups' => 'Groups'); } -sub get_colors { - my ($font,$pgbg,$tabbg); - if ($env{'browser.interface'} eq 'textual') { - $pgbg='#FFFFFF'; - $tabbg='#FFFFFF'; - $font='#000000'; - } else { - my $domain =&Apache::loncommon::determinedomain(); - my $function =&Apache::loncommon::get_users_function(); - - $pgbg =&Apache::loncommon::designparm($function.'.pgbg', $domain); - $tabbg =&Apache::loncommon::designparm($function.'.tabbg',$domain); - $font =&Apache::loncommon::designparm($function.'.font', $domain); - } - return ($font,$pgbg,$tabbg); -} # ============================= This gets called at the top of the body section sub menubuttons { @@ -125,7 +109,7 @@ sub menubuttons { # Textual display only if ($env{'request.course.id'}) { $navmaps=(<$lt{'nav'} +$lt{'nav'} ENDNAV if (($env{'request.noversionuri'}=~/^\/adm\//) && ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) && @@ -244,7 +228,10 @@ ENDCRELOAD my $form=&serverform(); my $utility=&utilityfunctions(); my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif"); - + my $remote; + if ($env{'user.adv'}) { + $remote = ''.$lt{'launch'}.'' + } return (< // BEGIN LON-CAPA Internal @@ -259,10 +246,10 @@ $reloadlink $navmaps $docs $groups -$lt{'launch'} +$remote $lt{'roles'} $lt{'exit'} -LogoLON-CAPA +LogoLON-CAPA $form @@ -320,18 +307,26 @@ sub innerregister { my $textual=($textinter || $noremote); - @inlineremote=(); - undef @inlineremote; + undef(@inlineremote); my $reopen=&Apache::lonmenu::reopenmenu(); - my ($font,$pgbg,$tabbg) = &get_colors(); - my $newmail=''; if ($noremote) { - $newmail='
'; + $newmail=''; } - if (($textual) && ($env{'request.symb'}) && ($env{'request.course.id'})) { + if (&Apache::lonmsg::newmail()) { + if ($textual) { + $newmail.= ''; + } else { + $newmail= 'swmenu.setstatus("you have","messages");'; + } + } elsif (($textual) + && ($env{'request.symb'}) + && ($env{'request.course.id'})) { + $newmail.= ''; } if ($env{'request.state'} eq 'construct') { $newmail = $titletable; } else { if ($noremote) { - $newmail.='
+ '. + &mt('You have new messages').''; my ($mapurl,$rid,$resurl)= &Apache::lonnet::decode_symb(&Apache::lonnet::symbread()); $newmail.=$env{'course.'.$env{'request.course.id'}.'.description'}; @@ -343,23 +338,19 @@ sub innerregister { if ($restitle) { $newmail.=': '.$restitle; } - $newmail.='   '; - } - if (&Apache::lonmsg::newmail()) { - $newmail=($textual? - 'You have new messages
': - 'swmenu.setstatus("you have","messages");'); + $newmail.='   
'; + $newmail.='
'; } } my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');'); - my $tablestart=($noremote?'':'').($textinter?'
'.&mt('Skip to Content').'
':''); - my $tableend=($noremote?'
':'').($textinter?'':''); + my $tablestart=($noremote?'':''). + ($textinter?'
'.&mt('Skip to Content').'
':''); + my $tableend=($noremote?'
':'').($textinter?'':''); # ============================================================================= # ============================ This is for URLs that actually can be registered if (($env{'request.noversionuri'}!~m|^/(res/)*adm/|) || ($forcereg)) { @@ -814,8 +805,6 @@ sub switch { $desc=&mt($desc); $img=&mt($img); - my ($font,$pgbg,$tabbg) = &get_colors(); - unless (($env{'browser.interface'} eq 'textual') || ($env{'environment.remote'} eq 'off')) { # Remote @@ -842,34 +831,33 @@ sub switch { my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } my $pic= - ''.$text.''; - if (($env{'browser.interface'} eq 'textual') || ($env{'browser.interface'} eq 'faketextual')) { + if ($env{'browser.interface'} eq 'faketextual') { # Accessibility if ($nobreak==3) { $inlineremote[10*$row+$col]="\n". - ''.$text. - ''. + ''.$text. + ''. ''.$pic.''; } elsif ($nobreak) { $inlineremote[10*$row+$col]="\n". - ''. - ''.$pic. - ''.$text.''; + ''. + ''.$pic.' + '.$text.''; } else { $inlineremote[10*$row+$col]="\n". - ''. + ''. ''.$pic. - ''.$desc. - ''; + ''. + $desc.''; } } else { # Inline Menu $inlineremote[10*$row+$col]= ''.$pic. - ''.$desc. - ''; + ''.$desc.''; } } return ''; @@ -1195,7 +1183,7 @@ function annotate() { +"
" +"" - +"
" + +"<\\/form>" +'$end_page'); annotator.document.close(); } @@ -1211,13 +1199,13 @@ function set_bookmark() { +"
\\n " - +"
Link Name:
" - +"
Address:

" + +"bgcolor='ffffff' align=center>Link Name:
" + +"
Address:

<\\/center><\\/td>" + +"<\\/tr><\\/table><\\/form><\\/center>" +'$end_page' ); bmquery.document.close(); } @@ -1227,7 +1215,7 @@ ENDUTILITY sub serverform { return(< +
@@ -1238,14 +1226,14 @@ ENDSERVERFORM sub constspaceform { return(< + -
+
-
+