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

www lon-capa-cvs@mail.lon-capa.org
Sat, 25 May 2002 20:41:12 -0000


www		Sat May 25 16:41:12 2002 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
  Log:
  Insert date on top and fix problem with focus being given to remote on
  time advance. Nice "float" effect on Linux, but problem on PC and Mac.
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.57 loncom/html/res/adm/pages/menu.html:1.58
--- loncom/html/res/adm/pages/menu.html:1.57	Fri May 24 16:59:34 2002
+++ loncom/html/res/adm/pages/menu.html	Sat May 25 16:41:12 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.57 2002/05/24 20:59:34 www Exp $
+// $Id: menu.html,v 1.58 2002/05/25 20:41:12 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -105,6 +105,15 @@
 
 function advanceclock() {
     clock.setTime(clock.getTime()+1000);
+
+    var days=""+clock.getDate();
+    if (days.length<2) { days="0"+days; }
+    var mons=""+(clock.getMonth()+1);
+    if (mons.length<2) { mons="0"+mons; }
+    var years=""+clock.getYear();
+    years=years.substring(1,3);
+    statustop=mons+'/'+days+'/'+years;
+
     var secs=""+clock.getSeconds();
     if (secs.length<2) { secs="0"+secs; }
     var mins=""+clock.getMinutes();
@@ -112,7 +121,9 @@
     var hours=""+clock.getHours();
     if (hours.length<2) { hours=" "+hours; }
     statusbot=hours+':'+mins+':'+secs;
-    if (!dislocked) { display(); }
+
+    if (!dislocked) { showdisplay(); }
+
     setTimeout('advanceclock();',1000);
 }
 
@@ -157,8 +168,12 @@
 }
 
 function display(utext,ltext) {
+    this.window.focus();
+    showdisplay(utext,ltext);
+}
+
+function showdisplay(utext,ltext) {
   var i; var ch;
-  this.window.focus();
   dislocked=1;
   if (utext == null) { utext = '';}
   if (ltext == null) { ltext = '';}