--- loncom/html/res/adm/pages/menu.html 2002/05/24 18:31:13 1.54
+++ loncom/html/res/adm/pages/menu.html 2002/05/24 20:59:34 1.57
@@ -4,7 +4,7 @@ The LearningOnline Network with CAPA
Remote Control
//
-// $Id: menu.html,v 1.54 2002/05/24 18:31:13 matthew Exp $
+// $Id: menu.html,v 1.57 2002/05/24 20:59:34 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -61,6 +61,7 @@ March 2002 Matthew Hall
var statustop = '';
var statusbot = '';
var active = 0;
+var dislocked = 1;
var imgpath='/res/adm/pages/';
@@ -68,6 +69,8 @@ var currentURL='';
var currentStale=1;
var menucltim;
+var clock=new Date();
+
// not used (yet)
// var w_Annotator;
// var w_bmquery;
@@ -100,6 +103,19 @@ for (var i=1;i<=3;i++) {
var clienthost=window.location.host;
var clientwindow=opener;
+function advanceclock() {
+ clock.setTime(clock.getTime()+1000);
+ var secs=""+clock.getSeconds();
+ if (secs.length<2) { secs="0"+secs; }
+ var mins=""+clock.getMinutes();
+ if (mins.length<2) { mins="0"+mins; }
+ var hours=""+clock.getHours();
+ if (hours.length<2) { hours=" "+hours; }
+ statusbot=hours+':'+mins+':'+secs;
+ if (!dislocked) { display(); }
+ setTimeout('advanceclock();',1000);
+}
+
function windowcheck() {
if (clientwindow==null || clientwindow.closed) {
clientwindow=window.open("http://"+clienthost+"/",'',
@@ -133,6 +149,7 @@ function logout () {
function activate () {
opener.menuloaded=1;
setTimeout('active=1;',2000);
+ advanceclock();
}
function deactivate () {
@@ -142,6 +159,7 @@ function deactivate () {
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 +167,7 @@ function display(utext,ltext) {
if ((utext=='') && (ltext=='')) {
utext=statustop;
ltext=statusbot;
+ dislocked=0;
}
if (active) {
for (i=0;i<=7;i++) {
@@ -156,6 +175,8 @@ function display(utext,ltext) {
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 +185,8 @@ function display(utext,ltext) {
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 +195,7 @@ function display(utext,ltext) {
function defdis() {
this.window.focus();
- display(statustop,statusbot);
+ display();
}
function switchbutton(row,col,imgsrc,texttop,textbot,action) {