[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 13 Feb 2002 16:08:26 -0000


www		Wed Feb 13 11:08:26 2002 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  Got rid of :nologout, position windows, allow comments in mydesk.tab
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.13 loncom/interface/lonmenu.pm:1.14
--- loncom/interface/lonmenu.pm:1.13	Fri Feb  8 18:52:37 2002
+++ loncom/interface/lonmenu.pm	Wed Feb 13 11:08:26 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.13 2002/02/08 23:52:37 harris41 Exp $
+# $Id: lonmenu.pm,v 1.14 2002/02/13 16:08:26 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -43,9 +43,12 @@
 sub open {
     return(<<ENDOPEN);
 <script>
-window.status='MenuControl:nologout';
+if (window.screen) {
+    self.resizeTo(screen.availWidth-215,screen.availHeight-30);
+    self.moveTo(190,15);
+}
 menu=window.open("/res/adm/pages/menu.html","LONCAPAmenu",
-                 "height=350,width=150,scrollbars=no,menubar=no");
+"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
 </script>
 ENDOPEN
 }
@@ -154,7 +157,6 @@
 sub close {
     return(<<ENDCLOSE);
 <script>
-window.status='MenuControl:nologout';
 menu=window.open("/adm/rat/empty.html","LONCAPAmenu",
                  "height=350,width=150,scrollbars=no,menubar=no");
 menu.close();
@@ -170,17 +172,22 @@
 
 # ================================================================ Main Program
 
-BEGIN {
-  unless ($readdesk) {
-  {
+sub BEGIN {
+  if ($readdesk ne 'done') {
+   {
     my $config=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.
 				  '/mydesk.tab');
     while (my $configline=<$config>) {
+       $configline=(split(/\#/,$configline))[0];
+       $configline=~s/^\s+//;
        chomp($configline);
-       $desklines[$#desklines+1]=$configline;
+       if ($configline) {
+          $desklines[$#desklines+1]=$configline;
+       }
     }
+   }
+   $readdesk='done';
   }
-}
 }
 1;
 __END__