Annotation of loncom/html/res/adm/pages/menu.html, revision 1.65
1.1 www 1: <html>
2: <!--
3: The LearningOnline Network with CAPA
4: Remote Control
1.40 www 5:
6: //
1.65 ! www 7: // $Id: menu.html,v 1.64 2002/07/26 12:51:11 matthew Exp $
1.40 www 8: //
9: // Copyright Michigan State University Board of Trustees
10: //
11: // This file is part of the LearningOnline Network with CAPA (LON-CAPA).
12: //
13: // LON-CAPA is free software; you can redistribute it and/or modify
14: // it under the terms of the GNU General Public License as published by
15: // the Free Software Foundation; either version 2 of the License, or
16: // (at your option) any later version.
17: //
18: // LON-CAPA is distributed in the hope that it will be useful,
19: // but WITHOUT ANY WARRANTY; without even the implied warranty of
20: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: // GNU General Public License for more details.
22: //
23: // You should have received a copy of the GNU General Public License
24: // along with LON-CAPA; if not, write to the Free Software
25: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26: //
27: // /home/httpd/html/adm/gpl.txt
28: //
29: // http://www.lon-capa.org/
30: //
31:
1.1 www 32: -->
33: <head>
34: <title>LON-CAPA Remote</title>
35: </head>
36:
1.23 www 37: <body bgcolor="#BBBBBB"
1.46 www 38: background="remotebg.gif"
1.49 matthew 39: onUnload="logout();"
40: >
1.62 www 41: <font size="1">
1.19 albertel 42: <script type="text/javascript">
1.22 harris41 43: <!--
1.44 matthew 44: var statustop = '';
45: var statusbot = '';
46: var active = 0;
1.55 www 47: var dislocked = 1;
1.1 www 48:
1.44 matthew 49: var imgpath='/res/adm/pages/';
1.65 ! www 50: var fontpath='/adm/lonLCDfont/';
1.27 harris41 51: var currentURL='';
1.59 www 52: var reloadURL='';
1.28 www 53: var currentStale=1;
1.33 www 54: var menucltim;
1.60 www 55:
56: var clockdelta=0;
1.55 www 57:
1.25 harris41 58: // not used (yet)
59: // var w_Annotator;
60: // var w_bmquery;
61: // var w_BookmarkPal;
62: // var w_LONcatInfo;
63:
64: //////////////////////////////////////
65: var w_Annotator_flag=-1;
66: var w_bmquery_flag=-1;
67: var w_BookmarkPal_flag=-1;
68: var w_LONcatInfo_flag=-1;
69: // 1 means currently open
70: // 0 means closed (but has been open)
71: // -1 means never yet opened/defined
72: ///////////////////////////////////////
73:
1.44 matthew 74: var hr = new Array;
75: var db = new Array;
76: var dt = new Array;
77:
78: for (var i=1;i<=3;i++) {
79: for (var j=1;j<=10;j++) {
80: var index = 10*j+i;
1.49 matthew 81: hr[index]='';
82: db[index]='';
83: dt[index]='';
1.44 matthew 84: }
85: }
1.31 www 86:
1.44 matthew 87: var clienthost=window.location.host;
88: var clientwindow=opener;
1.1 www 89:
1.60 www 90: function syncclock(servertime) {
91: var clientclock=new Date;
92: clockdelta=servertime-clientclock.getTime();
93: }
94:
1.55 www 95: function advanceclock() {
1.60 www 96: var clock=new Date();
97: clock.setTime(clock.getTime()+clockdelta);
1.58 www 98:
99: var days=""+clock.getDate();
100: if (days.length<2) { days="0"+days; }
101: var mons=""+(clock.getMonth()+1);
102: if (mons.length<2) { mons="0"+mons; }
103: var years=""+clock.getYear();
1.63 www 104:
105: if (years>1000) {
106: years=years.substring(2,4);
107: } else {
108: years=years.substring(1,3);
109: }
1.58 www 110: statustop=mons+'/'+days+'/'+years;
111:
1.56 www 112: var secs=""+clock.getSeconds();
113: if (secs.length<2) { secs="0"+secs; }
114: var mins=""+clock.getMinutes();
1.57 www 115: if (mins.length<2) { mins="0"+mins; }
1.56 www 116: var hours=""+clock.getHours();
117: if (hours.length<2) { hours=" "+hours; }
118: statusbot=hours+':'+mins+':'+secs;
1.58 www 119:
120: if (!dislocked) { showdisplay(); }
121:
1.55 www 122: setTimeout('advanceclock();',1000);
123: }
124:
1.1 www 125: function windowcheck() {
1.45 www 126: if (clientwindow==null || clientwindow.closed) {
127: clientwindow=window.open("http://"+clienthost+"/",'',
128: "height=400,width=440,"+
129: "scrollbars=1,toolbar=1,status=1,resizable=1,location=1,"+
130: "left=190,top=15,screenX=190,screenY=15");
1.1 www 131: }
1.7 www 132: clientwindow.name='loncapaclient';
1.45 www 133: clientwindow.menuwindow=self;
1.1 www 134: }
135:
1.5 www 136: function logout () {
1.10 www 137: windowcheck();
1.41 www 138:
1.25 harris41 139: if (w_Annotator_flag!=-1 && annotator && !annotator.closed) {
140: annotator.close();
141: }
142: if (w_bmquery_flag!=-1 && bmquery && !bmquery.closed) {
143: bmquery.close();
144: }
145: if (w_BookmarkPal_flag!=-1 && bookmarkpal && !bookmarkpal.closed) {
146: bookmarkpal.close();
147: }
148: if (w_LONcatInfo_flag!=-1 && loncatinfo && !loncatinfo.closed) {
149: loncatinfo.close();
150: }
1.9 www 151: clientwindow.window.location.href="http://"+clienthost+"/adm/logout";
1.41 www 152:
1.1 www 153: }
154:
1.23 www 155: function activate () {
1.31 www 156: opener.menuloaded=1;
1.23 www 157: setTimeout('active=1;',2000);
1.55 www 158: advanceclock();
1.23 www 159: }
160:
161: function deactivate () {
162: active=0;
163: }
164:
1.1 www 165: function display(utext,ltext) {
1.58 www 166: this.window.focus();
167: showdisplay(utext,ltext);
168: }
169:
170: function showdisplay(utext,ltext) {
1.23 www 171: var i; var ch;
1.55 www 172: dislocked=1;
1.47 matthew 173: if (utext == null) { utext = '';}
174: if (ltext == null) { ltext = '';}
1.49 matthew 175: if (typeof(utext)!="string") { utext=''; }
176: if (typeof(ltext)!="string") { ltext=''; }
1.31 www 177: if ((utext=='') && (ltext=='')) {
178: utext=statustop;
179: ltext=statusbot;
1.55 www 180: dislocked=0;
1.31 www 181: }
1.23 www 182: if (active) {
1.1 www 183: for (i=0;i<=7;i++) {
184: if (i<utext.length) {
185: ch=utext.charAt(i);
186: if (ch==' ') { ch='space'; }
187: if (ch=='-') { ch='hyphen'; }
1.55 www 188: if (ch==':') { ch='colon'; }
189: if (ch=='/') { ch='slash'; }
1.1 www 190: } else { ch='space'; }
1.65 ! www 191: this.document['i'+i].src=fontpath+ch+'.gif';
1.1 www 192: }
193: for (i=0;i<=7;i++) {
194: if (i<ltext.length) {
195: ch=ltext.charAt(i);
196: if (ch==' ') { ch='space'; }
197: if (ch=='-') { ch='hyphen'; }
1.55 www 198: if (ch==':') { ch='colon'; }
199: if (ch=='/') { ch='slash'; }
1.1 www 200: } else { ch='space'; }
1.65 ! www 201: this.document['j'+i].src=fontpath+ch+'.gif';
1.1 www 202: }
1.23 www 203: }
1.1 www 204: }
205:
206: function defdis() {
207: this.window.focus();
1.55 www 208: display();
1.1 www 209: }
210:
1.31 www 211: function switchbutton(row,col,imgsrc,texttop,textbot,action) {
212: var idx=10*row+col;
1.39 www 213: this.document['b'+idx].src="http://"+clienthost+imgpath+imgsrc;
1.31 www 214: hr[idx]=action;
215: dt[idx]=texttop;
216: db[idx]=textbot;
1.39 www 217: }
1.31 www 218:
219: function clearbut(row,col) {
220: var idx=10*row+col;
1.39 www 221: this.document['b'+idx].src="http://"+clienthost+imgpath+'empty.gif';
1.31 www 222: hr[idx]='javascript:defdis();';
223: dt[idx]='';
224: db[idx]='';
225: }
226:
1.1 www 227: function setstatus(tp,bt) {
228: this.document['led'].src="ledblink.gif";
229: statustop=tp;
230: statusbot=bt;
231: defdis();
232: endsend();
233: }
234:
1.52 matthew 235: function is_editable_resource (url) {
236: var Chunks = url.split('.');
237: var tmp = Chunks[Chunks.length-1];
238: if ((Chunks.length > 1) && (Math.floor(tmp) == tmp)) {
239: return true;
240: }
241: return false;
242: }
243:
1.47 matthew 244: function cstrgo(currenturl,defaulturl) {
245: windowcheck();
246: var url;
1.52 matthew 247: if ((currenturl == null) ||
248: (currenturl == '') ||
249: (! is_editable_resource(currenturl))) {
1.48 matthew 250: url = defaulturl;
251: } else {
1.47 matthew 252: url = currenturl;
1.48 matthew 253: var res_pattern = /^\/res\/[A-z0-p]+\//;
254: if (res_pattern.test(url)) {
255: // map /res/103/turtle to /priv/turtle
256: url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/');
257: } else {
1.47 matthew 258: url = defaulturl;
259: }
260: }
261: this.document['led'].src="ledsend.gif";
262: if (url != '') {
263: clientwindow.window.location.href="http://"+clienthost+url;
264: }
265: }
266:
1.1 www 267: function go(url) {
1.10 www 268: windowcheck();
1.1 www 269: this.document['led'].src="ledsend.gif";
1.53 matthew 270: if (url!='' && url!= null) {
1.47 matthew 271: currentURL = null;
1.7 www 272: clientwindow.window.location.href="http://"+clienthost+url;
273: }
274: }
275:
276: function gopost(url,postdata) {
1.10 www 277: windowcheck();
1.7 www 278: this.document['led'].src="ledsend.gif";
279: if (url!='') {
280: this.document.server.action="http://"+clienthost+url;
1.8 www 281: this.document.server.postdata.value=postdata;
1.34 www 282: this.document.server.command.value='';
283: this.document.server.url.value='';
284: this.document.server.submit();
285: }
286: }
287:
288: function gocmd(url,cmd) {
289: windowcheck();
290: this.document['led'].src="ledsend.gif";
291: if (url!='') {
292: this.document.server.action="http://"+clienthost+url;
293: this.document.server.postdata.value='';
294: this.document.server.command.value=cmd;
295: this.document.server.url.value=currentURL;
1.7 www 296: this.document.server.submit();
1.1 www 297: }
298: }
299:
1.2 tyszkabe 300: function annotate() {
1.25 harris41 301: w_Annotator_flag=1;
1.11 tyszkabe 302: annotator=window.open('','Annotator','width=365,height=265,scrollbars=0');
1.14 www 303: annotator.document.write(
304: "<html><body onload='Javascript:document.goannotate.submit();'>"
305: +"<form name='goannotate' target='Annotator' method='post' "
306: +"action='/adm/annotations'>"
1.36 www 307: +"<input type='hidden' name='urlnew' value='"+currentURL+"'>"
1.14 www 308: +"</form></body></html>");
309: annotator.document.close();
1.2 tyszkabe 310: }
311:
312: function set_bookmark() {
313: go('');
1.36 www 314: if (currentStale) {
315: clienttitle="Enter Title";
316: clienthref=currentURL;
317: } else {
318: clienttitle=clientwindow.document.title;
319: clienthref=clientwindow.location.pathname;
320: }
1.25 harris41 321: w_bmquery_flag=1;
1.24 tyszkabe 322: bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0');
323: bmquery.document.write(
324: "<html><body bgcolor='bbbbbb'><center><form method='post'"
325: +" name='newlink' action='/adm/bookmarks' target='bmquery' "
326: +">\n <table width=340 height=150 "
327: +"bgcolor='ffffff' align=center><tr><td>Link Name:<br><input "
328: +"type='text' name='title' size=45 value='"+clienttitle+"'>"
329: +"<br>Address:<br><input type='text' name='address' size='45' "
330: +"value='"+clienthref+"'><br><center><input type='submit' "
331: +"value='Save'> <input type='button' value='Close (no save)' "
332: +"onclick='javascript:window.close();'></center></td>"
333: +"</tr></table></form></center></body></html>");
334: bmquery.document.close();
1.2 tyszkabe 335: }
336:
337: function edit_bookmarks() {
338: go('');
1.25 harris41 339: w_BookmarkPal_flag=1;
340: bookmarkpal=window.open("http://"+clienthost+"/adm/bookmarks",
1.6 www 341: "BookmarkPal", "width=400,height=505,scrollbars=0");
1.2 tyszkabe 342: }
343:
1.14 www 344: function catalog_info() {
345: go('');
1.25 harris41 346: w_LONcatInfo_flag=1;
347: loncatinfo=window.open(clientwindow.window.location.href+'.meta',"LONcatInfo");
1.14 www 348: }
1.22 harris41 349: // -->
1.1 www 350: </script>
351: <center>
1.54 matthew 352: <table hspace="0" border="0" cellspacing="0" cellpadding="0">
1.1 www 353: <tr><td>
354: <a href="javascript:defdis();"
355: onMouseOver="defdis();"
1.54 matthew 356: ><img border="0" width="80" height="50" src="title.gif"></a>
1.1 www 357: </td><td>
1.54 matthew 358: <img border="0" width="50" height="50" name="led" src="ledoff.gif">
1.1 www 359: </td></tr>
360: </table>
1.54 matthew 361: </center>
362:
363: <center>
364: <a href="javascript:defdis();"
365: onMouseOver="defdis();"
1.62 www 366: ><img width="103" height="3" border="0" src="spacer.gif" /></a>
1.54 matthew 367: </center>
368:
369: <center>
370: <table hspace="1" border="0" cellspacing="0" cellpadding="1">
1.1 www 371: <tr><td bgcolor="#666666">
1.54 matthew 372: <table hspace="0" border="0" cellspacing="1" cellpadding="0">
1.1 www 373: <tr>
1.62 www 374: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i0" width="15" height="19" src="l.gif" /></a></td>
375: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i1" width="15" height="19" src="o.gif" /></a></td>
376: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i2" width="15" height="19" src="n.gif" /></a></td>
377: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i3" width="15" height="19" src="hyphen.gif"></a></td>
378: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i4" width="15" height="19" src="c.gif" /></a></td>
379: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i5" width="15" height="19" src="a.gif" /></a></td>
380: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i6" width="15" height="19" src="p.gif" /></a></td>
381: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="i7" width="15" height="19" src="a.gif" /></a></td>
382: </tr>
383: <tr>
384: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j0" width="15" height="19" src="space.gif" /></a></td>
385: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j1" width="15" height="19" src="space.gif" /></a></td>
386: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j2" width="15" height="19" src="space.gif" /></a></td>
387: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j3" width="15" height="19" src="space.gif" /></a></td>
388: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j4" width="15" height="19" src="space.gif" /></a></td>
389: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j5" width="15" height="19" src="space.gif" /></a></td>
390: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j6" width="15" height="19" src="space.gif" /></a></td>
391: <td><a href="javascript:defdis();" onMouseOver="defdis();"><img border="0" name="j7" width="15" height="19" src="space.gif" /></a></td>
1.1 www 392: </tr>
393: </table>
1.54 matthew 394: </td></tr>
395: </table>
396: </center>
1.1 www 397:
1.54 matthew 398: <center>
399: <table hspace="0" border="0" cellspacing="0" cellpadding="0">
1.31 www 400:
401: <tr>
1.54 matthew 402: <td colspan="2"><a href="javascript:eval(hr[11]);" onMouseOver="display(dt[11],db[11]);"><img width="86" height="20" border="0" name="b11" src="dempty.gif" /></a></td>
403: <td><a href="javascript:eval(hr[12]);" onMouseOver="display(dt[12],db[12]);"><img width="43" height="20" border="0" name="b12" src="empty.gif" /></a></td>
1.31 www 404: </tr>
405:
406: <tr>
1.54 matthew 407: <td rowspan="2"><a href="javascript:eval(hr[21]);" onMouseOver="display(dt[21],db[21]);"><img width="43" height="40" border="0" name="b21" src="qempty.gif" /></a></td>
408: <td><a href="javascript:eval(hr[22]);" onMouseOver="display(dt[22],db[22]);"><img width="43" height="20" border="0" name="b22" src="empty.gif" /></a></td>
409: <td rowspan="2"><a href="javascript:eval(hr[23]);" onMouseOver="display(dt[23],db[23]);"><img width="43" height="40" border="0" name="b23" src="qempty.gif" /></a></td>
1.31 www 410: </tr>
411:
412: <tr>
1.54 matthew 413: <td><a href="javascript:eval(hr[31]);" onMouseOver="display(dt[31],db[31]);"><img width="43" height="20" border="0" name="b31" src="empty.gif" /></a></td>
1.31 www 414: </tr>
415:
416: <tr>
1.54 matthew 417: <td><a href="javascript:eval(hr[41]);" onMouseOver="display(dt[41],db[41]);"><img width="43" height="20" border="0" name="b41" src="empty.gif" /></a></td>
418: <td><a href="javascript:eval(hr[42]);" onMouseOver="display(dt[42],db[42]);"><img width="43" height="20" border="0" name="b42" src="empty.gif" /></a></td>
419: <td><a href="javascript:eval(hr[43]);" onMouseOver="display(dt[43],db[43]);"><img width="43" height="20" border="0" name="b43" src="empty.gif" /></a></td>
1.31 www 420: </tr>
421:
422: <tr>
1.54 matthew 423: <td><a href="javascript:eval(hr[51]);" onMouseOver="display(dt[51],db[51]);"><img width="43" height="20" border="0" name="b51" src="empty.gif" /></a></td>
424: <td><a href="javascript:eval(hr[52]);" onMouseOver="display(dt[52],db[52]);"><img width="43" height="20" border="0" name="b52" src="empty.gif" /></a></td>
425: <td><a href="javascript:eval(hr[53]);" onMouseOver="display(dt[53],db[53]);"><img width="43" height="20" border="0" name="b53" src="empty.gif" /></a></td>
1.31 www 426: </tr>
427:
428: <tr>
1.54 matthew 429: <td><a href="javascript:eval(hr[61]);" onMouseOver="display(dt[61],db[61]);"><img width="43" height="20" border="0" name="b61" src="empty.gif" /></a></td>
430: <td><a href="javascript:eval(hr[62]);" onMouseOver="display(dt[62],db[62]);"><img width="43" height="20" border="0" name="b62" src="empty.gif" /></a></td>
431: <td><a href="javascript:eval(hr[63]);" onMouseOver="display(dt[63],db[63]);"><img width="43" height="20" border="0" name="b63" src="empty.gif" /></a></td>
1.31 www 432: </tr>
433:
434: <tr>
1.54 matthew 435: <td><a href="javascript:eval(hr[71]);" onMouseOver="display(dt[71],db[71]);"><img width="43" height="20" border="0" name="b71" src="empty.gif" /></a></td>
436: <td><a href="javascript:eval(hr[72]);" onMouseOver="display(dt[72],db[72]);"><img width="43" height="20" border="0" name="b72" src="empty.gif" /></a></td>
437: <td><a href="javascript:eval(hr[73]);" onMouseOver="display(dt[73],db[73]);"><img width="43" height="20" border="0" name="b73" src="empty.gif" /></a></td>
1.31 www 438: </tr>
439:
440: <tr>
1.54 matthew 441: <td><a href="javascript:eval(hr[81]);" onMouseOver="display(dt[81],db[81]);"><img width="43" height="20" border="0" name="b81" src="empty.gif" /></a></td>
442: <td><a href="javascript:eval(hr[82]);" onMouseOver="display(dt[82],db[82]);"><img width="43" height="20" border="0" name="b82" src="empty.gif" /></a></td>
443: <td><a href="javascript:eval(hr[83]);" onMouseOver="display(dt[83],db[83]);"><img width="43" height="20" border="0" name="b83" src="empty.gif" /></a></td>
1.31 www 444: </tr>
1.1 www 445:
1.31 www 446: <tr>
1.54 matthew 447: <td><a href="javascript:eval(hr[91]);" onMouseOver="display(dt[91],db[91]);"><img width="43" height="20" border="0" name="b91" src="empty.gif" /></a></td>
448: <td><a href="javascript:eval(hr[92]);" onMouseOver="display(dt[92],db[92]);"><img width="43" height="20" border="0" name="b92" src="empty.gif" /></a></td>
449: <td><a href="javascript:eval(hr[93]);" onMouseOver="display(dt[93],db[93]);"><img width="43" height="20" border="0" name="b93" src="empty.gif" /></a></td>
1.35 www 450: </tr>
451:
452: <tr>
1.54 matthew 453: <td><a href="javascript:eval(hr[101]);" onMouseOver="display(dt[101],db[101]);"><img width="43" height="20" border="0" name="b101" src="empty.gif" /></a></td>
454: <td><a href="javascript:eval(hr[102]);" onMouseOver="display(dt[102],db[102]);"><img width="43" height="20" border="0" name="b102" src="empty.gif" /></a></td>
455: <td><a href="javascript:eval(hr[103]);" onMouseOver="display(dt[103],db[103]);"><img width="43" height="20" border="0" name="b103" src="empty.gif" /></a></td>
1.31 www 456: </tr>
1.1 www 457:
1.62 www 458: <tr>
459: <td><a href="javascript:eval(hr[111]);" onMouseOver="display(dt[111],db[111]);"><img width="43" height="20" border="0" name="b111" src="empty.gif" /></a></td>
460: <td><a href="javascript:eval(hr[112]);" onMouseOver="display(dt[112],db[112]);"><img width="43" height="20" border="0" name="b112" src="empty.gif" /></a></td>
461: <td><a href="javascript:eval(hr[113]);" onMouseOver="display(dt[113],db[113]);"><img width="43" height="20" border="0" name="b113" src="empty.gif" /></a></td>
462: </tr>
463:
1.31 www 464: </table>
1.54 matthew 465: </center>
1.1 www 466:
1.54 matthew 467: <center>
1.1 www 468: <a href="javascript:defdis();"
469: onMouseOver="defdis();"
1.64 matthew 470: ><img width="103" height="3" border="0" src="spacer.gif" /></a>
1.54 matthew 471: </center>
1.1 www 472:
1.54 matthew 473: <form name="server" action="/adm/logout" method="post" target="loncapaclient">
474: <input type="hidden" name="postdata" value="none" />
1.34 www 475: <input type="hidden" name="command" value="none" />
476: <input type="hidden" name="url" value="none" />
1.54 matthew 477: </form>
1.37 harris41 478: <script>
479: activate();
480: </script>
1.62 www 481: </font>
1.1 www 482: </body>
1.20 www 483: </html>
1.42 matthew 484:
485:
486:
487:
488:
489:
490:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>