--- loncom/interface/lonmenu.pm 2003/04/05 22:14:40 1.58 +++ loncom/interface/lonmenu.pm 2003/05/16 20:47:07 1.66 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.58 2003/04/05 22:14:40 www Exp $ +# $Id: lonmenu.pm,v 1.66 2003/05/16 20:47:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,6 +57,7 @@ sub menubuttons { my $target =shift; my $registration=shift; my $navmaps=''; + my $reloadlink=''; my $escurl=&Apache::lonnet::escape($ENV{'REQUEST_URI'}); my $escsymb=&Apache::lonnet::escape($ENV{'request.symb'}); if ($ENV{'browser.interface'} eq 'textual') { @@ -65,13 +66,21 @@ sub menubuttons { $navmaps=(<Navigate Contents ENDNAV + if (($ENV{'REQUEST_URI'}=~/^\/adm\//) && + ($ENV{'REQUEST_URI'}!~/^\/adm\/wrapper\//) && + ($ENV{'REQUEST_URI'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { + my $escreload=&Apache::lonnet::escape('return:'); + $reloadlink=(<Return to Last Location +ENDRELOAD + } } my $output=(< // BEGIN LON-CAPA Internal Main Menu -$navmaps
+$reloadlink $navmaps
@@ -106,6 +115,15 @@ ENDMAINMENU Navigate Contents ENDNAVREM + if (($ENV{'REQUEST_URI'}=~/^\/adm\//) && + ($ENV{'REQUEST_URI'}!~/^\/adm\/wrapper\//) && + ($ENV{'REQUEST_URI'}!~/^\/adm\/.*\/(smppg|bulletinboard|aboutme)(\?|$)/)) { + my $escreload=&Apache::lonnet::escape('return:'); + $reloadlink=(< +Return to Last Location +ENDRELOAD + } } my $reg=''; if ($registration) { @@ -120,10 +138,14 @@ ENDNAVREM Main Menu +$reloadlink $navmaps Launch Remote Control + + +LON-CAPA '; + ''.$force_title; } # Graphical display after login only if ($Apache::lonxml::registered && !$forcereg) { return ''; } $result.=&innerregister($forcereg,$target); - return $result; + return $result.$force_title; } # =========== This gets called in order to register a URL, both with the Remote @@ -184,11 +210,30 @@ sub innerregister { my $reopen=&Apache::lonmenu::reopenmenu(); my $newmail=''; + if ($noremote) { + $newmail='
'; + } + if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) { + my ($mapurl,$rid,$resurl)=split(/\_\_\_/,$ENV{'request.symb'}); + $newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; + my $maptitle=&Apache::lonnet::gettitle($mapurl); + my $restitle=&Apache::lonnet::gettitle($resurl); + if ($maptitle) { + $newmail.=', '.$maptitle; + } + if ($restitle) { + $newmail.=': '.$restitle; + } + $newmail.='   '; + } if (&Apache::lonmsg::newmail()) { $newmail=($textual? 'You have new messages
': 'swmenu.setstatus("you have","messages");'); } + if ($noremote) { + $newmail.='
'; + } my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');'); my $tablestart=($noremote?'':''); my $tableend=($noremote?'
':''); @@ -312,7 +357,7 @@ $inlinebuttons $tableend $form ENDREGTEXT @@ -558,7 +603,7 @@ sub switch { my $text=$top.' '.$bot; $text=~s/\- //; $inlineremote[10*$row+$col]="\n".($nobreak?' ':'
'). - ''.$text.' '. + ''.$text.' '. ($nobreak?'':$desc); } else { # Inline Remote @@ -568,7 +613,7 @@ sub switch { $inlineremote[10*$row+$col]="\n". ($nobreak==3?''.$text.''. ($nobreak?'':''.$desc.'').($nobreak!=1?'':''); @@ -758,7 +803,7 @@ function gocmd(url,cmd) { } function catalog_info() { - loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizeable=yes,location=no,menubar=no,toolbar=no'); + loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizeable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); } function chat_win() { @@ -770,7 +815,7 @@ ENDUTILITY sub serverform { return(< +