[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages 0.gif 1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gif 8.gif 9.gif colon.gif menu.html slash.gif

www lon-capa-cvs@mail.lon-capa.org
Fri, 24 May 2002 19:45:14 -0000


www		Fri May 24 15:45:14 2002 EDT

  Added files:                 
    /loncom/html/res/adm/pages	0.gif 1.gif 2.gif 3.gif 4.gif 5.gif 
                              	6.gif 7.gif 8.gif 9.gif colon.gif 
                              	slash.gif 

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
  Log:
  Little clock - does not sync with server yet. Next step.
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.54 loncom/html/res/adm/pages/menu.html:1.55
--- loncom/html/res/adm/pages/menu.html:1.54	Fri May 24 14:31:13 2002
+++ loncom/html/res/adm/pages/menu.html	Fri May 24 15:45:14 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.54 2002/05/24 18:31:13 matthew Exp $
+// $Id: menu.html,v 1.55 2002/05/24 19:45:14 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -61,6 +61,7 @@
 var statustop = '';
 var statusbot = '';
 var active = 0;
+var dislocked = 1;
 
 var imgpath='/res/adm/pages/';
 
@@ -68,6 +69,8 @@
 var currentStale=1;
 var menucltim;
 
+var clock=new Date();
+
 // not used (yet)
 // var w_Annotator;
 // var w_bmquery;
@@ -100,6 +103,13 @@
 var clienthost=window.location.host;
 var clientwindow=opener;
 
+function advanceclock() {
+    clock.setTime(clock.getTime()+1000);
+    statusbot=clock.getHours()+':'+clock.getMinutes()+':'+clock.getSeconds();
+    if (!dislocked) { display(); }
+    setTimeout('advanceclock();',1000);
+}
+
 function windowcheck() {
    if (clientwindow==null || clientwindow.closed) {
       clientwindow=window.open("http://"+clienthost+"/",'',
@@ -133,6 +143,7 @@
 function activate () {
    opener.menuloaded=1;
    setTimeout('active=1;',2000);
+   advanceclock();
 }
 
 function deactivate () {
@@ -142,6 +153,7 @@
 function display(utext,ltext) {
   var i; var ch;
   this.window.focus();
+  dislocked=1;
   if (utext == null) { utext = '';}
   if (ltext == null) { ltext = '';}
   if (typeof(utext)!="string") { utext=''; }
@@ -149,6 +161,7 @@
   if ((utext=='') && (ltext=='')) {
      utext=statustop;
      ltext=statusbot;
+     dislocked=0;
   }
   if (active) { 
    for (i=0;i<=7;i++) {
@@ -156,6 +169,8 @@
          ch=utext.charAt(i);
          if (ch==' ') { ch='space'; }
          if (ch=='-') { ch='hyphen'; }
+         if (ch==':') { ch='colon'; }
+         if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
       this.document['i'+i].src=imgpath+ch+'.gif';
    }
@@ -164,6 +179,8 @@
          ch=ltext.charAt(i);
          if (ch==' ') { ch='space'; }
          if (ch=='-') { ch='hyphen'; }
+         if (ch==':') { ch='colon'; }
+         if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
       this.document['j'+i].src=imgpath+ch+'.gif';
    }
@@ -172,7 +189,7 @@
 
 function defdis() {
    this.window.focus();
-   display(statustop,statusbot);
+   display();
 }
 
 function switchbutton(row,col,imgsrc,texttop,textbot,action) {