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