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

www lon-capa-cvs@mail.lon-capa.org
Tue, 27 May 2003 15:50:30 -0000


www		Tue May 27 11:50:30 2003 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm lonspreadsheet.pm 
  Log:
  Bug #1496: long-running spreadsheet did not register with Remote before
  completely loaded. Produces "extra windows".
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.71 loncom/interface/lonmenu.pm:1.72
--- loncom/interface/lonmenu.pm:1.71	Sat May 24 08:43:55 2003
+++ loncom/interface/lonmenu.pm	Tue May 27 11:50:29 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.71 2003/05/24 12:43:55 www Exp $
+# $Id: lonmenu.pm,v 1.72 2003/05/27 15:50:29 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,6 +156,13 @@
     } else {
 	return '';
     }
+}
+
+# ===== Early call to LONCAPAreg for long-running pages, preferably used right 
+# ===== before $r->rflush()
+
+sub regflush {
+    return '<script type="text/javascript">'.&loadevents.'</script>';
 }
 
 # ====================================== This gets called in the header section
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.178 loncom/interface/lonspreadsheet.pm:1.179
--- loncom/interface/lonspreadsheet.pm:1.178	Thu Mar 20 14:10:27 2003
+++ loncom/interface/lonspreadsheet.pm	Tue May 27 11:50:30 2003
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.178 2003/03/20 19:10:27 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.179 2003/05/27 15:50:30 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -57,6 +57,7 @@
 use Apache::Constants qw(:common :http);
 use Apache::lonnet;
 use Apache::lonhtmlcommon;
+use Apache::lonmenu;
 use HTML::Entities();
 
 # --------------------------------------------------------- Various form fields
@@ -244,7 +245,8 @@
               &hiddenfield('udom',$ENV{'form.udom'}).
               &hiddenfield('usymb',$ENV{'form.usymb'}).
               &hiddenfield('unewfield','').
-              &hiddenfield('unewformula',''));
+              &hiddenfield('unewformula','').
+              &Apache::lonmenu::regflush());
     $r->rflush();
     #
     # Full recalc?