version 1.69, 2002/09/06 17:05:27
|
version 1.74, 2002/11/12 16:31:40
|
Line 45 var statustop = '';
|
Line 45 var statustop = '';
|
var statusbot = ''; |
var statusbot = ''; |
var active = 0; |
var active = 0; |
var dislocked = 1; |
var dislocked = 1; |
|
var statuslocked = 0; |
|
|
var imgpath='/res/adm/pages/'; |
var imgpath=':8080/res/adm/pages/'; |
var fontpath='/adm/lonLCDfont/'; |
var fontpath=':8080/adm/lonLCDfont/'; |
var currentURL=''; |
var currentURL=''; |
var reloadURL=''; |
var reloadURL=''; |
var currentSymb=''; |
var currentSymb=''; |
Line 76 var w_LONcatInfo_flag=-1;
|
Line 77 var w_LONcatInfo_flag=-1;
|
var hr = new Array; |
var hr = new Array; |
var db = new Array; |
var db = new Array; |
var dt = new Array; |
var dt = new Array; |
|
var ds = new Array; |
|
|
for (var i=1;i<=3;i++) { |
for (var i=1;i<=3;i++) { |
for (var j=1;j<=10;j++) { |
for (var j=1;j<=10;j++) { |
Line 83 for (var i=1;i<=3;i++) {
|
Line 85 for (var i=1;i<=3;i++) {
|
hr[index]=''; |
hr[index]=''; |
db[index]=''; |
db[index]=''; |
dt[index]=''; |
dt[index]=''; |
|
ds[index]=''; |
} |
} |
} |
} |
|
|
Line 97 function syncclock(servertime) {
|
Line 100 function syncclock(servertime) {
|
function advanceclock() { |
function advanceclock() { |
var clock=new Date(); |
var clock=new Date(); |
clock.setTime(clock.getTime()+clockdelta); |
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 (!dislocked) { showdisplay(); } |
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; |
|
|
|
if (!dislocked) { showdisplay(); } |
|
|
|
setTimeout('advanceclock();',1000); |
setTimeout('advanceclock();',1000); |
} |
} |
|
|
Line 190 function showdisplay(utext,ltext) {
|
Line 193 function showdisplay(utext,ltext) {
|
if (ch==':') { ch='colon'; } |
if (ch==':') { ch='colon'; } |
if (ch=='/') { ch='slash'; } |
if (ch=='/') { ch='slash'; } |
} else { ch='space'; } |
} 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++) { |
for (i=0;i<=7;i++) { |
if (i<ltext.length) { |
if (i<ltext.length) { |
Line 200 function showdisplay(utext,ltext) {
|
Line 203 function showdisplay(utext,ltext) {
|
if (ch==':') { ch='colon'; } |
if (ch==':') { ch='colon'; } |
if (ch=='/') { ch='slash'; } |
if (ch=='/') { ch='slash'; } |
} else { ch='space'; } |
} else { ch='space'; } |
this.document['j'+i].src=fontpath+ch+'.gif'; |
this.document['j'+i].src="http://"+clienthost+fontpath+ch+'.gif'; |
} |
} |
} |
} |
} |
} |
Line 210 function defdis() {
|
Line 213 function defdis() {
|
display(); |
display(); |
} |
} |
|
|
function switchbutton(row,col,imgsrc,texttop,textbot,action) { |
function switchbutton(row,col,imgsrc,texttop,textbot,action,desc) { |
var idx=10*row+col; |
var idx=10*row+col; |
this.document['b'+idx].src="http://"+clienthost+imgpath+imgsrc; |
this.document['b'+idx].src="http://"+clienthost+imgpath+imgsrc; |
hr[idx]=action; |
hr[idx]=action; |
dt[idx]=texttop; |
dt[idx]=texttop; |
db[idx]=textbot; |
db[idx]=textbot; |
|
ds[idx]=desc; |
} |
} |
|
|
function clearbut(row,col) { |
function clearbut(row,col) { |
Line 224 function clearbut(row,col) {
|
Line 228 function clearbut(row,col) {
|
hr[idx]='javascript:defdis();'; |
hr[idx]='javascript:defdis();'; |
dt[idx]=''; |
dt[idx]=''; |
db[idx]=''; |
db[idx]=''; |
|
ds[idx]=''; |
} |
} |
|
|
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; |
|
statuslocked=1; |
defdis(); |
defdis(); |
endsend(); |
|
} |
} |
|
|
function is_editable_resource (url) { |
function is_editable_resource (url) { |
Line 272 function cstrgo(currenturl,defaulturl) {
|
Line 277 function cstrgo(currenturl,defaulturl) {
|
|
|
function go(url) { |
function go(url) { |
windowcheck(); |
windowcheck(); |
|
statuslocked=0; |
this.document['led'].src="ledsend.gif"; |
this.document['led'].src="ledsend.gif"; |
if (url!='' && url!= null) { |
if (url!='' && url!= null) { |
currentURL = null; |
currentURL = null; |
Line 282 function go(url) {
|
Line 288 function go(url) {
|
|
|
function gopost(url,postdata) { |
function gopost(url,postdata) { |
windowcheck(); |
windowcheck(); |
this.document['led'].src="ledsend.gif"; |
statuslocked=0; |
|
this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; |
if (url!='') { |
if (url!='') { |
this.document.server.action="http://"+clienthost+url; |
this.document.server.action="http://"+clienthost+url; |
this.document.server.postdata.value=postdata; |
this.document.server.postdata.value=postdata; |
Line 295 function gopost(url,postdata) {
|
Line 302 function gopost(url,postdata) {
|
|
|
function gocmd(url,cmd) { |
function gocmd(url,cmd) { |
windowcheck(); |
windowcheck(); |
this.document['led'].src="ledsend.gif"; |
statuslocked=0; |
|
this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; |
if (url!='') { |
if (url!='') { |
this.document.server.action="http://"+clienthost+url; |
this.document.server.action="http://"+clienthost+url; |
this.document.server.postdata.value=''; |
this.document.server.postdata.value=''; |
Line 343 function set_bookmark() {
|
Line 351 function set_bookmark() {
|
bmquery.document.close(); |
bmquery.document.close(); |
} |
} |
|
|
|
function extdisp() { |
|
go(''); |
|
extdisp=window.open("http://"+clienthost+"/adm/rat/empty.html", |
|
"ExtDisp", "width=400,height=450"); |
|
extdisp.document.clear(); |
|
extdisp.document.writeln( |
|
'<html><body bgcolor="#666666" text="#DDDDDD" link="#666666">'+ |
|
'<h2>LON-CAPA Extended Display Remote Control</h2>'+ |
|
'<script>var currentURL="'+currentURL+'";self.focus();</script>'+ |
|
'<table border="2">'); |
|
for (var i=0; i<=ds.length; i++) { |
|
if (typeof(ds[i])!='undefined') { |
|
if (ds[i]!='') { |
|
extdisp.document.writeln( |
|
'<tr><td><a href="javascript:opener.'+ |
|
hr[i]+';self.close();"><img border="0" src="'+ |
|
this.document['b'+i].src+'" /><br />'+ |
|
'<table hspace="0" border="0" cellspacing="1" cellpadding="0"><tr>'); |
|
for (var j=0;j<=7;j++) { |
|
if (j<dt[i].length) { |
|
ch=dt[i].charAt(j); |
|
if (ch==' ') { ch='space'; } |
|
if (ch=='-') { ch='hyphen'; } |
|
if (ch==':') { ch='colon'; } |
|
if (ch=='/') { ch='slash'; } |
|
} else { ch='space'; } |
|
extdisp.document.writeln('<td><img border="0" src="http://' |
|
+clienthost+fontpath+ch+'.gif" /></td>'); |
|
} |
|
extdisp.document.writeln('</tr><tr>'); |
|
for (var j=0;j<=7;j++) { |
|
if (j<db[i].length) { |
|
ch=db[i].charAt(j); |
|
if (ch==' ') { ch='space'; } |
|
if (ch=='-') { ch='hyphen'; } |
|
if (ch==':') { ch='colon'; } |
|
if (ch=='/') { ch='slash'; } |
|
} else { ch='space'; } |
|
extdisp.document.writeln('<td><img border="0" src="http://' |
|
+clienthost+fontpath+ch+'.gif" /></td>'); |
|
} |
|
extdisp.document.writeln( |
|
'</tr></table></td><td>'+ds[i]+'</td></tr>'); |
|
} |
|
} |
|
} |
|
extdisp.document.writeln('</table></body></html>'); |
|
extdisp.document.close(); |
|
} |
function edit_bookmarks() { |
function edit_bookmarks() { |
go(''); |
go(''); |
w_BookmarkPal_flag=1; |
w_BookmarkPal_flag=1; |
Line 370 function catalog_info() {
|
Line 427 function catalog_info() {
|
</center> |
</center> |
|
|
<center> |
<center> |
<a href="javascript:defdis();" |
<a href="javascript:extdisp();" |
onMouseOver="defdis();" |
onMouseOver="defdis();" |
><img width="103" height="3" border="0" src="spacer.gif" /></a> |
><img width="104" height="10" border="0" src="spacer.gif" /></a> |
</center> |
</center> |
|
|
<center> |
<center> |
Line 473 function catalog_info() {
|
Line 530 function catalog_info() {
|
</table> |
</table> |
</center> |
</center> |
|
|
<center> |
|
<a href="javascript:defdis();" |
|
onMouseOver="defdis();" |
|
><img width="103" height="3" border="0" src="spacer.gif" /></a> |
|
</center> |
|
|
|
<form name="server" action="/adm/logout" method="post" target="loncapaclient"> |
<form name="server" action="/adm/logout" method="post" target="loncapaclient"> |
<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" /> |