[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm /html/res/adm/pages menu.html /interface lonmenu.pm

www lon-capa-cvs@mail.lon-capa.org
Sat, 24 May 2003 12:43:55 -0000


www		Sat May 24 08:43:55 2003 EDT

  Modified files:              
    /loncom/auth	lonauth.pm 
    /loncom/html/res/adm/pages	menu.html 
    /loncom/interface	lonmenu.pm 
  Log:
  Cleaning up after bug #1178 - keep track of WHICH window is closed
  Bug #1472 - should not go "haywire" anymore when closing Remote while
  clientwindow shows external resource
  
  
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.50 loncom/auth/lonauth.pm:1.51
--- loncom/auth/lonauth.pm:1.50	Fri May 23 17:18:56 2003
+++ loncom/auth/lonauth.pm	Sat May 24 08:43:54 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # User Authentication Module
 #
-# $Id: lonauth.pm,v 1.50 2003/05/23 21:18:56 www Exp $
+# $Id: lonauth.pm,v 1.51 2003/05/24 12:43:54 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -204,7 +204,7 @@
 
 sub failed {
     my ($r,$message) = @_;
-    my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login');
+    my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login',undef,' ');
     $r->send_cgi_header(<<ENDFHEADER);
 Content-type: text/html
 
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.98 loncom/html/res/adm/pages/menu.html:1.99
--- loncom/html/res/adm/pages/menu.html:1.98	Fri May 23 12:37:30 2003
+++ loncom/html/res/adm/pages/menu.html	Sat May 24 08:43:54 2003
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.98 2003/05/23 16:37:30 www Exp $
+// $Id: menu.html,v 1.99 2003/05/24 12:43:54 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -138,6 +138,14 @@
     setTimeout('advanceclock();',1000);
 }
 
+function windowloaded(wname) {
+   if (wname=='loncapaclient') { noclient=0; }
+}
+
+function windowunloaded(wname) {
+   if (wname=='loncapaclient') { noclient=1;}
+}
+
 function windowcheck() {
    if (noclient || (clientwindow==null || clientwindow.closed)) {
       clientwindow=window.open("http://"+clienthost+"/",'',
@@ -280,7 +288,7 @@
        currentURL = null;
        currentSymb= null;
        clientwindow.window.location.href="http://"+clienthost+url;
-       noclient=0;
+       clientwindow.name='loncapaclient';
    }
 }
 
@@ -295,7 +303,6 @@
       this.document.server.url.value='';
       this.document.server.postsymb.value='';
       this.document.server.submit();
-      noclient=0;
    }
 }
 
@@ -310,7 +317,6 @@
       this.document.server.url.value=currentURL;
       this.document.server.postsymb.value=currentSymb;
       this.document.server.submit();
-      noclient=0;
    }
 }
 
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.70 loncom/interface/lonmenu.pm:1.71
--- loncom/interface/lonmenu.pm:1.70	Fri May 23 19:58:53 2003
+++ loncom/interface/lonmenu.pm	Sat May 24 08:43:55 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.70 2003/05/23 23:58:53 www Exp $
+# $Id: lonmenu.pm,v 1.71 2003/05/24 12:43:55 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -186,8 +186,8 @@
                 ($ENV{'environment.remote'} eq 'off') ||
                 ($ENV{'request.publicaccess'})) {
 	    my $reopen=&Apache::lonmenu::reopenmenu();
- 	    $loadfunction='swmenu='.$reopen.'swmenu.noclient=0;';
- 	    $unloadfunction='swmenu='.$reopen.'swmenu.noclient=1;';
+ 	    $loadfunction='swmenu='.$reopen.'swmenu.windowloaded(self.name);';
+ 	    $unloadfunction='swmenu='.$reopen.'swmenu.windowunloaded(self.name);';
         } 
 	return $result.(<<ENDFUNCTIONS);
 <script type="text/javascript">
@@ -391,7 +391,7 @@
 
     function LONCAPAreg() {
 	  swmenu=$reopen;
-          swmenu.noclient=0;
+          swmenu.windowloaded(self.name);
           swmenu.clearTimeout(swmenu.menucltim);
           $timesync
           $newmail
@@ -419,7 +419,7 @@
  'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
  'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
 			  2000);
-          swmenu.noclient=1;
+          swmenu.windowunloaded(self.name);
       }
 
 // END LON-CAPA Internal
@@ -443,7 +443,7 @@
 
     function LONCAPAreg() {
 	  swmenu=$reopen
-	  swmenu.noclient=0;
+	  swmenu.windowloaded(self.name);
           $timesync
           swmenu.currentStale=1;
           swmenu.clearbut(2,1);
@@ -461,7 +461,7 @@
 
     function LONCAPAstale() {
  	  swmenu=$reopen
-	  swmenu.noclient=1;  
+	  swmenu.windowunloaded(self.name);  
     }
 
 // END LON-CAPA Internal
@@ -592,6 +592,7 @@
 window.status='Opening LON-CAPA Remote Control';
 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");
+self.name='loncapaclient';
 ENDOPEN
     return '<script>'.$returnval.'</script>';
 }