--- loncom/html/res/adm/pages/menu.html 2002/09/02 19:58:51 1.67
+++ loncom/html/res/adm/pages/menu.html 2002/10/29 20:57:31 1.73
@@ -4,7 +4,7 @@ The LearningOnline Network with CAPA
Remote Control
//
-// $Id: menu.html,v 1.67 2002/09/02 19:58:51 bowersj2 Exp $
+// $Id: menu.html,v 1.73 2002/10/29 20:57:31 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -45,11 +45,14 @@ var statustop = '';
var statusbot = '';
var active = 0;
var dislocked = 1;
+var statuslocked = 0;
-var imgpath='/res/adm/pages/';
-var fontpath='/adm/lonLCDfont/';
+var imgpath=':8080/res/adm/pages/';
+var fontpath=':8080/adm/lonLCDfont/';
var currentURL='';
var reloadURL='';
+var currentSymb='';
+var reloadSymb='';
var currentStale=1;
var menucltim;
@@ -95,30 +98,30 @@ function syncclock(servertime) {
function advanceclock() {
var clock=new Date();
clock.setTime(clock.getTime()+clockdelta);
+ if (!statuslocked) {
+ 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();
+
+ if (years>1000) {
+ years=years.substring(2,4);
+ } else {
+ years=years.substring(1,3);
+ }
+ statustop=mons+'/'+days+'/'+years;
+
+ 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;
- 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();
-
- if (years>1000) {
- years=years.substring(2,4);
- } else {
- years=years.substring(1,3);
+ if (!dislocked) { showdisplay(); }
}
- statustop=mons+'/'+days+'/'+years;
-
- 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) { showdisplay(); }
-
setTimeout('advanceclock();',1000);
}
@@ -188,7 +191,7 @@ function showdisplay(utext,ltext) {
if (ch==':') { ch='colon'; }
if (ch=='/') { ch='slash'; }
} else { ch='space'; }
- this.document['i'+i].src=fontpath+ch+'.gif';
+ this.document['i'+i].src="http://"+clienthost+fontpath+ch+'.gif';
}
for (i=0;i<=7;i++) {
if (i 1) && (Math.floor(tmp) == tmp)) {
- return true;
- }
- return false;
+ return false;
+ }
+// see if this is actually in resource space
+ var SlashChunks=url.split('/');
+ if (SlashChunks[1]!='res') { return false; }
+ return true;
}
function cstrgo(currenturl,defaulturl) {
@@ -249,14 +256,14 @@ function cstrgo(currenturl,defaulturl) {
(! is_editable_resource(currenturl))) {
url = defaulturl;
} else {
- url = currenturl;
- var res_pattern = /^\/res\/[A-z0-p]+\//;
- if (res_pattern.test(url)) {
- // map /res/103/turtle to /priv/turtle
- url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/');
- } else {
- url = defaulturl;
+ var SlashChunks=currenturl.split('/');
+ SlashChunks[1]='priv';
+ var i;
+ for (i=2;i
+