--- loncom/interface/lonmenu.pm 2004/08/27 17:03:45 1.115 +++ loncom/interface/lonmenu.pm 2004/10/28 16:25:21 1.118 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.115 2004/08/27 17:03:45 albertel Exp $ +# $Id: lonmenu.pm,v 1.118 2004/10/28 16:25:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,7 +69,6 @@ sub menubuttons { my $forcereg=shift; my $target =shift; my $registration=shift; - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); if ($ENV{'form.inhibitmenu'} eq 'yes') { return ''; } @@ -97,9 +96,11 @@ ENDNAV ENDRELOAD } } + my $utility=&utilityfunctions(); my $output=(< // BEGIN LON-CAPA Internal +$utility $lt{'main'} $reloadlink $navmaps
@@ -134,12 +135,8 @@ ENDMAINMENU my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain); # Do we have a NAV link? if ($ENV{'request.course.id'}) { - my $navcontrol=&Apache::lonnavmaps::nav_control_js(); - $navmaps=(< - $lt{'nav'} ENDNAV if (($ENV{'request.noversionuri'}=~/^\/adm\//) && @@ -156,9 +153,11 @@ ENDRELOAD if ($registration) { $reg=&innerregister($forcereg,$target); } + my $utility=&utilityfunctions(); return (< // BEGIN LON-CAPA Internal +$utility @@ -389,7 +388,6 @@ ENDREALRES } if ($textual) { # Registered, textual output - my $utility=&utilityfunctions(); my $form=&serverform(); my $inlinebuttons=''; @@ -408,7 +406,6 @@ ENDINLINE $result =(< // BEGIN LON-CAPA Internal -$utility $timesync $newmail @@ -535,11 +532,18 @@ sub startupremote { # my $configmenu=&rawconfig(); my $esclowerurl=&Apache::lonnet::escape($lowerurl); - + my $message=&mt('"Waiting for remote to load "+[_1]','waited'); return(< - +var timestart; function wheelswitch() { + if (typeof(document.wheel) != 'undefined') { + if (typeof(document.wheel.spin) != 'undefined') { + var date=new Date(); + var waited=Math.round(30-((date.getTime()-timestart)/1000)); + document.wheel.spin.value=$message; + } + } if (window.status=='|') { window.status='/'; } else { @@ -576,6 +580,8 @@ function wait() { function main() { canceltim=setTimeout('tim=1;',30000); window.status='-'; + var date=new Date(); + timestart=date.getTime(); wait(); } @@ -601,6 +607,25 @@ sub maincall() { ENDMAINCALL } + +sub load_remote_msg { + my ($lowerurl)=@_; + + if (($ENV{'browser.interface'} eq 'textual') || + ($ENV{'environment.remote'} eq 'off')) { return ''; } + + my $esclowerurl=&Apache::lonnet::escape($lowerurl); + my $link=&mt('Continue on in inline remote mode', + "/adm/remote?action=collapse?url=$esclowerurl"); + return(< +
+ + +

+

$link

+ENDREMOTEFORM +} # ================================================================= Reopen menu sub reopenmenu { @@ -981,13 +1006,9 @@ sub handler { $ENV{'browser.interface'}='faketextual'; $ENV{'environment.remote'}='off'; } - my $utility=&utilityfunctions(); $r->print(< LON-CAPA Main Menu - $bodytag ENDHEADER