--- loncom/html/res/adm/pages/menu.html 2002/09/02 19:58:51 1.67
+++ loncom/html/res/adm/pages/menu.html 2002/10/11 19:27:00 1.70
@@ -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.70 2002/10/11 19:27:00 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -50,6 +50,8 @@ var imgpath='/res/adm/pages/';
var fontpath='/adm/lonLCDfont/';
var currentURL='';
var reloadURL='';
+var currentSymb='';
+var reloadSymb='';
var currentStale=1;
var menucltim;
@@ -225,7 +227,7 @@ function clearbut(row,col) {
}
function setstatus(tp,bt) {
- this.document['led'].src="ledblink.gif";
+ this.document['led'].src="http://"+clienthost+imgpath+"ledblink.gif";
statustop=tp;
statusbot=bt;
defdis();
@@ -233,12 +235,16 @@ function setstatus(tp,bt) {
}
function is_editable_resource (url) {
+// figure out if this a specific resource version
var Chunks = url.split('.');
var tmp = Chunks[Chunks.length-1];
if ((Chunks.length > 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 +255,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
+