Diff for /loncom/interface/lonmenu.pm between versions 1.29 and 1.30

version 1.29, 2002/12/06 17:49:49 version 1.30, 2003/01/15 23:59:26
Line 38  use strict; Line 38  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::File;  use Apache::File;
 use vars qw(@desklines $readdesk);  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  # =============================================================== Open the menu
   
 sub open {  sub open {
     my $returnval='';      my $returnval='';
       my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
     unless (shift eq 'unix') {      unless (shift eq 'unix') {
 # resizing does not work on linux because of virtual desktop sizes  # resizing does not work on linux because of virtual desktop sizes
        $returnval.=(<<ENDRESIZE);         $returnval.=(<<ENDRESIZE);
Line 53  if (window.screen) { Line 63  if (window.screen) {
 ENDRESIZE  ENDRESIZE
     }      }
     $returnval.=(<<ENDOPEN);      $returnval.=(<<ENDOPEN);
 var menu=window.open("/res/adm/pages/menu.html","LONCAPAmenu",  var menu=window.open("/res/adm/pages/menu.html","$menuname",
 "height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");  "height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
 ENDOPEN  ENDOPEN
     return '<script>'.$returnval.'</script>';      return '<script>'.$returnval.'</script>';
Line 104  sub secondlevel { Line 114  sub secondlevel {
 }  }
   
 sub openmenu {  sub openmenu {
       my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
     if ($ENV{'browser.type'} eq 'explorer') {      if ($ENV{'browser.type'} eq 'explorer') {
        return "window.open('javascript:void(0);','LONCAPAmenu');";         return "window.open('javascript:void(0);','".$menuname."');";
    } else {     } else {
        return "window.open('','LONCAPAmenu');";         return "window.open('','".$menuname."');";
    }     }
 }  }
   
Line 187  sub rawconfig { Line 198  sub rawconfig {
 # ======================================================================= Close  # ======================================================================= Close
   
 sub close {  sub close {
       my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
     return(<<ENDCLOSE);      return(<<ENDCLOSE);
 <script>  <script>
 menu=window.open("/adm/rat/empty.html","LONCAPAmenu",  menu=window.open("/adm/rat/empty.html","$menuname",
                  "height=350,width=150,scrollbars=no,menubar=no");                   "height=350,width=150,scrollbars=no,menubar=no");
 menu.close();  menu.close();
 </script>  </script>
Line 221  BEGIN { Line 233  BEGIN {
    $readdesk='done';     $readdesk='done';
   }    }
 }  }
   
 1;  1;
 __END__  __END__
   

Removed from v.1.29  
changed lines
  Added in v.1.30


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>