--- loncom/interface/lonmenu.pm 2003/02/20 18:00:31 1.43 +++ loncom/interface/lonmenu.pm 2003/03/10 20:21:45 1.47 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.43 2003/02/20 18:00:31 www Exp $ +# $Id: lonmenu.pm,v 1.47 2003/03/10 20:21:45 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,6 +37,7 @@ package Apache::lonmenu; use strict; use Apache::lonnet; use Apache::Constants qw(:common); +use Apache::lonhtmlcommon(); use Apache::loncommon; use Apache::File; use vars qw(@desklines $readdesk); @@ -49,7 +50,15 @@ sub menubuttons { my $registration=shift; unless ($ENV{'browser.interface'} eq 'textual') { return ''; } # Textual display only - my $output='Main Menu
'; + my $output=(< +// BEGIN LON-CAPA Internal + +Main Menu
+ +ENDMAINMENU if ($registration) { $output.=&innerregister($forcereg,$target); } return $output."
"; } @@ -62,7 +71,7 @@ sub registerurl { my $result = ''; if ($target eq 'edit') { - $result .="\n"; @@ -237,7 +246,7 @@ var swmenu=null; $newmail $buttons swmenu.currentURL=window.location.pathname; - swmenu.reloadURL=window.location.pathname; + swmenu.reloadURL=window.location.pathname+window.location.search; swmenu.currentSymb="$ENV{'request.symb'}"; swmenu.reloadSymb="$ENV{'request.symb'}"; swmenu.currentStale=0; @@ -393,11 +402,10 @@ ENDMAINCALL # ================================================================= Reopen menu sub reopenmenu { - my $nothing=''; if ($ENV{'browser.interface'} eq 'textual') { return ''; } my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; - if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; } - return('window.open("'.$nothing.'","'.$menuname.'","",false);'); + my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); + return('window.open('.$nothing.',"'.$menuname.'","",false);'); } # =============================================================== Open the menu @@ -471,11 +479,8 @@ sub secondlevel { sub openmenu { my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; if ($ENV{'browser.interface'} eq 'textual') { return ''; } - if ($ENV{'browser.type'} eq 'explorer') { - return "window.open('javascript:void(0);','".$menuname."');"; - } else { - return "window.open('','".$menuname."');"; - } + my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); + return "window.open(".$nothing.",'".$menuname."');"; } sub rawconfig {