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

www lon-capa-cvs@mail.lon-capa.org
Fri, 23 May 2003 13:56:39 -0000


www		Fri May 23 09:56:39 2003 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
    /loncom/interface	lonmenu.pm 
  Log:
  Attempt to fix quadruplicate bug 1178: when using browser URL field of
  main content window to go to an external site, JavaScript security model
  disconnects all access the Remote could have to it, including the one to
  even find out if it has access.
  
  Implemented flag "noclient" in the Remote which gets set in an unLoad event of 
  the main window (ignoring the fact that unLoad is kaputt in some browser 
  versions).
  
  This all seems to work great on Mozilla, but I am sure there will be stupid
  side effects in some odd scenarios. 
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.96 loncom/html/res/adm/pages/menu.html:1.97
--- loncom/html/res/adm/pages/menu.html:1.96	Wed Apr 30 17:26:47 2003
+++ loncom/html/res/adm/pages/menu.html	Fri May 23 09:56:39 2003
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.96 2003/04/30 21:26:47 albertel Exp $
+// $Id: menu.html,v 1.97 2003/05/23 13:56:39 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -59,6 +59,7 @@
 var reloadSymb='';
 var currentStale=1;
 var menucltim;
+var noclient=1;
 
 var clockdelta=0;
 
@@ -138,7 +139,7 @@
 }
 
 function windowcheck() {
-   if (clientwindow==null || clientwindow.closed) {
+   if (noclient || (clientwindow==null || clientwindow.closed)) {
       clientwindow=window.open("http://"+clienthost+"/",'',
       "height=400,width=440,"+
       "scrollbars=1,toolbar=1,status=1,resizable=1,location=1,"+
@@ -146,6 +147,7 @@
    }
    clientwindow.name='loncapaclient';
    clientwindow.menuwindow=self;
+   noclient=0;
    extenddispclose();
 }
 
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.66 loncom/interface/lonmenu.pm:1.67
--- loncom/interface/lonmenu.pm:1.66	Fri May 16 16:47:07 2003
+++ loncom/interface/lonmenu.pm	Fri May 23 09:56:39 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.66 2003/05/16 20:47:07 albertel Exp $
+# $Id: lonmenu.pm,v 1.67 2003/05/23 13:56:39 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -371,6 +371,7 @@
 
     function LONCAPAreg() {
 	  swmenu=$reopen;
+          swmenu.noclient=0;
           swmenu.clearTimeout(swmenu.menucltim);
           $timesync
           $newmail
@@ -398,7 +399,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;
       }
 
 // END LON-CAPA Internal
@@ -422,6 +423,7 @@
 
     function LONCAPAreg() {
 	  swmenu=$reopen
+	  swmenu.noclient=0;
           $timesync
           swmenu.currentStale=1;
           swmenu.clearbut(2,1);
@@ -438,6 +440,8 @@
     }
 
     function LONCAPAstale() {
+ 	  swmenu=$reopen
+	  swmenu.noclient=1;  
     }
 
 // END LON-CAPA Internal