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