--- loncom/interface/lonmenu.pm 2002/12/06 17:49:49 1.29 +++ loncom/interface/lonmenu.pm 2003/01/15 23:59:26 1.30 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.29 2002/12/06 17:49:49 matthew Exp $ +# $Id: lonmenu.pm,v 1.30 2003/01/15 23:59:26 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,11 +38,21 @@ use strict; use Apache::lonnet; use Apache::File; use vars qw(@desklines $readdesk); - + +# ================================================================= Reopen menu + +sub reopenmenu { + my $nothing=''; + my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; + if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; } + return('window.open("'.$nothing.'","'.$menuname.'","",false);'); +} + # =============================================================== Open the menu sub open { my $returnval=''; + my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; unless (shift eq 'unix') { # resizing does not work on linux because of virtual desktop sizes $returnval.=(<'.$returnval.''; @@ -104,10 +114,11 @@ sub secondlevel { } sub openmenu { + my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; if ($ENV{'browser.type'} eq 'explorer') { - return "window.open('javascript:void(0);','LONCAPAmenu');"; + return "window.open('javascript:void(0);','".$menuname."');"; } else { - return "window.open('','LONCAPAmenu');"; + return "window.open('','".$menuname."');"; } } @@ -187,9 +198,10 @@ sub rawconfig { # ======================================================================= Close sub close { + my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'}; return(< -menu=window.open("/adm/rat/empty.html","LONCAPAmenu", +menu=window.open("/adm/rat/empty.html","$menuname", "height=350,width=150,scrollbars=no,menubar=no"); menu.close(); @@ -221,6 +233,7 @@ BEGIN { $readdesk='done'; } } + 1; __END__