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