version 1.67, 2002/09/02 19:58:51
|
version 1.70, 2002/10/11 19:27:00
|
Line 50 var imgpath='/res/adm/pages/';
|
Line 50 var imgpath='/res/adm/pages/';
|
var fontpath='/adm/lonLCDfont/'; |
var fontpath='/adm/lonLCDfont/'; |
var currentURL=''; |
var currentURL=''; |
var reloadURL=''; |
var reloadURL=''; |
|
var currentSymb=''; |
|
var reloadSymb=''; |
var currentStale=1; |
var currentStale=1; |
var menucltim; |
var menucltim; |
|
|
Line 225 function clearbut(row,col) {
|
Line 227 function clearbut(row,col) {
|
} |
} |
|
|
function setstatus(tp,bt) { |
function setstatus(tp,bt) { |
this.document['led'].src="ledblink.gif"; |
this.document['led'].src="http://"+clienthost+imgpath+"ledblink.gif"; |
statustop=tp; |
statustop=tp; |
statusbot=bt; |
statusbot=bt; |
defdis(); |
defdis(); |
Line 233 function setstatus(tp,bt) {
|
Line 235 function setstatus(tp,bt) {
|
} |
} |
|
|
function is_editable_resource (url) { |
function is_editable_resource (url) { |
|
// figure out if this a specific resource version |
var Chunks = url.split('.'); |
var Chunks = url.split('.'); |
var tmp = Chunks[Chunks.length-1]; |
var tmp = Chunks[Chunks.length-1]; |
if ((Chunks.length > 1) && (Math.floor(tmp) == tmp)) { |
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) { |
function cstrgo(currenturl,defaulturl) { |
Line 249 function cstrgo(currenturl,defaulturl) {
|
Line 255 function cstrgo(currenturl,defaulturl) {
|
(! is_editable_resource(currenturl))) { |
(! is_editable_resource(currenturl))) { |
url = defaulturl; |
url = defaulturl; |
} else { |
} else { |
url = currenturl; |
var SlashChunks=currenturl.split('/'); |
var res_pattern = /^\/res\/[A-z0-p]+\//; |
SlashChunks[1]='priv'; |
if (res_pattern.test(url)) { |
var i; |
// map /res/103/turtle to /priv/turtle |
for (i=2;i<SlashChunks.length;i++) { |
url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/'); |
SlashChunks[i]=SlashChunks[i+1]; |
} else { |
|
url = defaulturl; |
|
} |
} |
|
SlashChunks.length--; |
|
url=SlashChunks.join('/'); |
} |
} |
this.document['led'].src="ledsend.gif"; |
this.document['led'].src="ledsend.gif"; |
if (url != '') { |
if (url != '') { |
Line 269 function go(url) {
|
Line 275 function go(url) {
|
this.document['led'].src="ledsend.gif"; |
this.document['led'].src="ledsend.gif"; |
if (url!='' && url!= null) { |
if (url!='' && url!= null) { |
currentURL = null; |
currentURL = null; |
|
currentSymb= null; |
clientwindow.window.location.href="http://"+clienthost+url; |
clientwindow.window.location.href="http://"+clienthost+url; |
} |
} |
} |
} |
Line 281 function gopost(url,postdata) {
|
Line 288 function gopost(url,postdata) {
|
this.document.server.postdata.value=postdata; |
this.document.server.postdata.value=postdata; |
this.document.server.command.value=''; |
this.document.server.command.value=''; |
this.document.server.url.value=''; |
this.document.server.url.value=''; |
|
this.document.server.symb.value=''; |
this.document.server.submit(); |
this.document.server.submit(); |
} |
} |
} |
} |
Line 293 function gocmd(url,cmd) {
|
Line 301 function gocmd(url,cmd) {
|
this.document.server.postdata.value=''; |
this.document.server.postdata.value=''; |
this.document.server.command.value=cmd; |
this.document.server.command.value=cmd; |
this.document.server.url.value=currentURL; |
this.document.server.url.value=currentURL; |
|
this.document.server.symb.value=currentSymb; |
this.document.server.submit(); |
this.document.server.submit(); |
} |
} |
} |
} |
Line 474 function catalog_info() {
|
Line 483 function catalog_info() {
|
<input type="hidden" name="postdata" value="none" /> |
<input type="hidden" name="postdata" value="none" /> |
<input type="hidden" name="command" value="none" /> |
<input type="hidden" name="command" value="none" /> |
<input type="hidden" name="url" value="none" /> |
<input type="hidden" name="url" value="none" /> |
|
<input type="hidden" name="symb" value="none" /> |
</form> |
</form> |
<script> |
<script> |
activate(); |
activate(); |