Annotation of loncom/html/res/adm/pages/menu.html, revision 1.31

1.1       www         1: <html>
                      2: <!--
                      3: The LearningOnline Network with CAPA
                      4: Remote Control
                      5: 6/12/00,6/13,6/14,6/15 Gerd Kortemeyer
1.5       www         6: Sept Ben Tyszka
1.15      www         7: 10/2,10/3,10/4,10/17,10/19,3/1/1 Gerd Kortemeyer
1.18      www         8: Jan Guy Albertelli
                      9: 5/1/1 Gerd Kortemeyer
1.19      albertel   10: 2/19 Guy Albertelli
1.23      www        11: 3/21 Gerd Kortemeyer
1.24      tyszkabe   12: 4/30 Ben Tyszka
1.28      www        13: 5/2 Scott Harrison
1.31    ! www        14: 5/4,5/9,5/28,5/30,6/1,6/2 Gerd Kortemeyer
1.1       www        15: -->
                     16: <head>
                     17: <title>LON-CAPA Remote</title>
                     18: </head>
                     19: 
                     20: 
1.23      www        21: <body bgcolor="#BBBBBB" 
                     22:       background="remotebg.gif"
                     23:       onLoad="activate();" 
                     24:       onUnload="logout();">
1.19      albertel   25: <basefont size="1" />
1.1       www        26: 
1.19      albertel   27: <script type="text/javascript">
1.22      harris41   28: <!--
1.1       www        29: statustop='';
                     30: statusbot='';
1.23      www        31: active=0;
1.1       www        32: 
1.31    ! www        33: imgpath='/res/adm/pages/';
        !            34: 
1.27      harris41   35: var currentURL='';
1.28      www        36: var currentStale=1;
1.26      harris41   37: 
1.25      harris41   38: // not used (yet)
                     39: // var w_Annotator;
                     40: // var w_bmquery;
                     41: // var w_BookmarkPal;
                     42: // var w_LONcatInfo;
                     43: 
                     44: //////////////////////////////////////
                     45: var w_Annotator_flag=-1;
                     46: var w_bmquery_flag=-1;
                     47: var w_BookmarkPal_flag=-1;
                     48: var w_LONcatInfo_flag=-1;
                     49:  // 1 means currently open
                     50:  // 0 means closed (but has been open)
                     51:  // -1 means never yet opened/defined
                     52: ///////////////////////////////////////
                     53: 
1.31    ! www        54: hr=new Array;
        !            55: db=new Array;
        !            56: dt=new Array;
        !            57: 
1.1       www        58: clienthost=window.location.host;
                     59: clientwindow=opener;
                     60: 
                     61: function windowcheck() {
                     62:    if (clientwindow.closed) {
                     63:       clientwindow=window.open("http://"+clienthost+"/"); 
                     64:    }
1.7       www        65:    clientwindow.name='loncapaclient';
1.1       www        66: }
                     67: 
1.5       www        68: function logout () {
1.10      www        69:    windowcheck();
                     70:    if (clientwindow.status!='MenuControl:nologout')
                     71:    {   
1.25      harris41   72:       if (w_Annotator_flag!=-1 && annotator && !annotator.closed) {
                     73:           annotator.close();
                     74:       }
                     75:       if (w_bmquery_flag!=-1 && bmquery && !bmquery.closed) {
                     76:           bmquery.close();
                     77:       }
                     78:       if (w_BookmarkPal_flag!=-1 && bookmarkpal && !bookmarkpal.closed) {
                     79:           bookmarkpal.close();
                     80:       }
                     81:       if (w_LONcatInfo_flag!=-1 && loncatinfo && !loncatinfo.closed) {
                     82:           loncatinfo.close();
                     83:       }
1.9       www        84:       clientwindow.window.location.href="http://"+clienthost+"/adm/logout";
                     85:    }
1.1       www        86: }
                     87: 
1.31    ! www        88: function checkurl () {
        !            89:    if (currentURL) {
        !            90:       if (currentStale) {
        !            91:          clearbut(2,1);
        !            92:          clearbut(2,3);
        !            93:          clearbut(8,1);
        !            94:          clearbut(8,2);
        !            95:          clearbut(8,3);
        !            96:          switchbutton(3,1,'reload.gif','return','location','go(currentURL)');
        !            97:       } else {
        !            98:          clearbut(3,1);
        !            99:          switchbutton(8,1,'eval.gif','evaluate','this','gopost("/adm/evaluate",currentURL)');
        !           100:          switchbutton(8,2,'fdbk.gif','feedback','on this','gopost("/adm/feedback",currentURL)');
        !           101:          switchbutton(8,3,'prt.gif','prepare','printout','gopost("/adm/printout",currentURL)');
        !           102:          switchbutton(2,1,'back.gif','backward','','gopost("/adm/flip","back:"+currentURL)');
        !           103:          switchbutton(2,3,'forw.gif','forward','','gopost("/adm/flip","forward:"+currentURL)');
        !           104:      }
        !           105:    } else {
        !           106:       clearbut(2,1);
        !           107:       clearbut(2,3);
        !           108:       clearbut(3,1);
        !           109:       clearbut(8,1);
        !           110:       clearbut(8,2);
        !           111:       clearbut(8,3);
        !           112:    }
        !           113:    setTimeout('checkurl();',500);   
        !           114: }
        !           115: 
1.23      www       116: function activate () {
1.31    ! www       117:    opener.menuloaded=1;
1.23      www       118:    setTimeout('active=1;',2000);
1.31    ! www       119:    setTimeout('checkurl();',1500);
1.23      www       120: }
                    121: 
                    122: function deactivate () {
                    123:    active=0;
                    124: }
                    125: 
1.1       www       126: function display(utext,ltext) {
1.23      www       127:   var i; var ch;
                    128:   this.window.focus();
1.31    ! www       129:   if (utext==undefined) { utext=''; }
        !           130:   if (ltext==undefined) { ltext=''; }
        !           131:   if ((utext=='') && (ltext=='')) {
        !           132:      utext=statustop;
        !           133:      ltext=statusbot;
        !           134:   }
1.23      www       135:   if (active) { 
1.1       www       136:    for (i=0;i<=7;i++) {
                    137:       if (i<utext.length) {
                    138:          ch=utext.charAt(i);
                    139:          if (ch==' ') { ch='space'; }
                    140:          if (ch=='-') { ch='hyphen'; }
                    141:       } else { ch='space'; }
1.31    ! www       142:       this.document['i'+i].src=imgpath+ch+'.gif';
1.1       www       143:    }
                    144:    for (i=0;i<=7;i++) {
                    145:       if (i<ltext.length) {
                    146:          ch=ltext.charAt(i);
                    147:          if (ch==' ') { ch='space'; }
                    148:          if (ch=='-') { ch='hyphen'; }
                    149:       } else { ch='space'; }
1.31    ! www       150:       this.document['j'+i].src=imgpath+ch+'.gif';
1.1       www       151:    }
1.23      www       152:   }
1.1       www       153: }
                    154: 
                    155: function defdis() {
                    156:    this.window.focus();
                    157:    display(statustop,statusbot);
                    158: }
                    159: 
1.31    ! www       160: function switchbutton(row,col,imgsrc,texttop,textbot,action) {
        !           161:    var idx=10*row+col;
        !           162:    this.document['b'+idx].src=imgpath+imgsrc;
        !           163:    hr[idx]=action;
        !           164:    dt[idx]=texttop;
        !           165:    db[idx]=textbot;
        !           166: }
        !           167: 
        !           168: function clearbut(row,col) {
        !           169:    var idx=10*row+col;
        !           170:    this.document['b'+idx].src=imgpath+'empty.gif';
        !           171:    hr[idx]='javascript:defdis();';
        !           172:    dt[idx]='';
        !           173:    db[idx]='';
        !           174: }
        !           175: 
1.1       www       176: function setstatus(tp,bt) {
                    177:    this.document['led'].src="ledblink.gif";
                    178:    statustop=tp;
                    179:    statusbot=bt;
                    180:    defdis();
                    181:    endsend();
                    182: }
                    183: 
                    184: function go(url) {
1.10      www       185:    windowcheck();
1.1       www       186:    this.document['led'].src="ledsend.gif";
                    187:    if (url!='') {
1.7       www       188:        clientwindow.window.location.href="http://"+clienthost+url;
                    189:    }
                    190: }
                    191: 
                    192: function gopost(url,postdata) {
1.10      www       193:    windowcheck();
1.7       www       194:    this.document['led'].src="ledsend.gif";
                    195:    if (url!='') {
                    196:       this.document.server.action="http://"+clienthost+url;
1.8       www       197:       this.document.server.postdata.value=postdata;
1.7       www       198:       this.document.server.submit();
1.1       www       199:    }
                    200: }
                    201: 
1.2       tyszkabe  202: function annotate() {
1.25      harris41  203:    w_Annotator_flag=1;
1.11      tyszkabe  204:    annotator=window.open('','Annotator','width=365,height=265,scrollbars=0');
1.14      www       205:    annotator.document.write(
                    206:    "<html><body onload='Javascript:document.goannotate.submit();'>"
                    207:   +"<form name='goannotate' target='Annotator' method='post' "
                    208:   +"action='/adm/annotations'>"
                    209:   +"<input type='hidden' name='urlnew' value='"+clientwindow.location.href+"'>"
                    210:   +"</form></body></html>");
                    211:    annotator.document.close();
1.2       tyszkabe  212: }
                    213: 
                    214: function set_bookmark() {
                    215:    go('');
1.24      tyszkabe  216:    clienttitle="Enter Title";
                    217:    clienthref="Enter Address";
1.25      harris41  218:    w_bmquery_flag=1;
1.24      tyszkabe  219:    bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0');
                    220:    bmquery.document.write(
                    221:    "<html><body bgcolor='bbbbbb'><center><form method='post'"
                    222:    +" name='newlink' action='/adm/bookmarks' target='bmquery' "
                    223:    +">\n <table width=340 height=150 "
                    224:    +"bgcolor='ffffff' align=center><tr><td>Link Name:<br><input "
                    225:    +"type='text' name='title' size=45 value='"+clienttitle+"'>"
                    226:    +"<br>Address:<br><input type='text' name='address' size='45' "
                    227:    +"value='"+clienthref+"'><br><center><input type='submit' "
                    228:    +"value='Save'> <input type='button' value='Close (no save)' "
                    229:    +"onclick='javascript:window.close();'></center></td>"
                    230:    +"</tr></table></form></center></body></html>");
                    231:    bmquery.document.close();
1.2       tyszkabe  232: }
                    233: 
                    234: function edit_bookmarks() {
                    235:    go('');
1.25      harris41  236:    w_BookmarkPal_flag=1;
                    237:    bookmarkpal=window.open("http://"+clienthost+"/adm/bookmarks",
1.6       www       238:                "BookmarkPal", "width=400,height=505,scrollbars=0");
1.2       tyszkabe  239: }
                    240: 
1.14      www       241: function catalog_info() {
                    242:    go('');
1.25      harris41  243:    w_LONcatInfo_flag=1;
                    244:    loncatinfo=window.open(clientwindow.window.location.href+'.meta',"LONcatInfo");
1.14      www       245: }
1.22      harris41  246: // -->
1.1       www       247: </script>
                    248: 
                    249: <center>
1.31    ! www       250: <table border="0" cellspacing="1" cellpadding="0">
1.1       www       251: <tr><td>
                    252: <a href="javascript:defdis();"
                    253:    onMouseOver="defdis();"
1.19      albertel  254: ><img border="0" src="title.gif"></img></a>
1.1       www       255: </td><td>
1.19      albertel  256: <img border="0" name="led" src="ledoff.gif"> </img>
1.1       www       257: </td></tr>
                    258: </table>
1.17      albertel  259: <br />
1.19      albertel  260: <table border="0" cellspacing="1" cellpadding="1">
1.1       www       261: <tr><td bgcolor="#666666">
1.19      albertel  262: <table border="0" cellspacing="1" cellpadding="0"> 
1.1       www       263: <tr>
1.19      albertel  264: <td><img name="i0" src="l.gif"></img></td>
                    265: <td><img name="i1" src="o.gif"></img></td>
                    266: <td><img name="i2" src="n.gif"></img></td>
                    267: <td><img name="i3" src="hyphen.gif"></img></td>
                    268: <td><img name="i4" src="c.gif"></img></td>
                    269: <td><img name="i5" src="a.gif"></img></td>
                    270: <td><img name="i6" src="p.gif"></img></td>
                    271: <td><img name="i7" src="a.gif"></img></td>
1.1       www       272: </tr>
                    273: <tr>
1.19      albertel  274: <td><img name="j0" src="space.gif"></img></td>
                    275: <td><img name="j1" src="space.gif"></img></td>
                    276: <td><img name="j2" src="space.gif"></img></td>
                    277: <td><img name="j3" src="space.gif"></img></td>
                    278: <td><img name="j4" src="space.gif"></img></td>
                    279: <td><img name="j5" src="space.gif"></img></td>
                    280: <td><img name="j6" src="space.gif"></img></td>
                    281: <td><img name="j7" src="space.gif"></img></td>
1.1       www       282: </tr>
                    283: </table>
                    284: </td>
                    285: </tr>
1.17      albertel  286: </table><br />
1.1       www       287: 
1.31    ! www       288: <table border="0" cellspacing="0" cellpadding="0">
        !           289: 
        !           290: <tr>
        !           291: <td colspan="2"><a href="javascript:eval(hr[11]);" onMouseOver="display(dt[11],db[11]);"><img border="0" name="b11" src="dempty.gif"></img></a></td>
        !           292: <td><a href="javascript:eval(hr[12]);" onMouseOver="display(dt[12],db[12]);"><img border="0" name="b12" src="empty.gif"></img></a></td>
        !           293: </tr>
        !           294: 
        !           295: <tr>
        !           296: <td rowspan="2"><a href="javascript:eval(hr[21]);" onMouseOver="display(dt[21],db[21]);"><img border="0" name="b21" src="qempty.gif"></img></a></td>
        !           297: <td><a href="javascript:eval(hr[22]);" onMouseOver="display(dt[22],db[22]);"><img border="0" name="b22" src="empty.gif"></img></a></td>
        !           298: <td rowspan="2"><a href="javascript:eval(hr[23]);" onMouseOver="display(dt[23],db[23]);"><img border="0" name="b23" src="qempty.gif"></img></a></td>
        !           299: </tr>
        !           300: 
        !           301: <tr>
        !           302: <td><a href="javascript:eval(hr[31]);" onMouseOver="display(dt[31],db[31]);"><img border="0" name="b31" src="empty.gif"></img></a></td>
        !           303: </tr>
        !           304: 
        !           305: <tr>
        !           306: <td><a href="javascript:eval(hr[41]);" onMouseOver="display(dt[41],db[41]);"><img border="0" name="b41" src="empty.gif"></img></a></td>
        !           307: <td><a href="javascript:eval(hr[42]);" onMouseOver="display(dt[42],db[42]);"><img border="0" name="b42" src="empty.gif"></img></a></td>
        !           308: <td><a href="javascript:eval(hr[43]);" onMouseOver="display(dt[43],db[43]);"><img border="0" name="b43" src="empty.gif"></img></a></td>
        !           309: </tr>
        !           310: 
        !           311: <tr>
        !           312: <td><a href="javascript:eval(hr[51]);" onMouseOver="display(dt[51],db[51]);"><img border="0" name="b51" src="empty.gif"></img></a></td>
        !           313: <td><a href="javascript:eval(hr[52]);" onMouseOver="display(dt[52],db[52]);"><img border="0" name="b52" src="empty.gif"></img></a></td>
        !           314: <td><a href="javascript:eval(hr[53]);" onMouseOver="display(dt[53],db[53]);"><img border="0" name="b53" src="empty.gif"></img></a></td>
        !           315: </tr>
        !           316: 
        !           317: <tr>
        !           318: <td><a href="javascript:eval(hr[61]);" onMouseOver="display(dt[61],db[61]);"><img border="0" name="b61" src="empty.gif"></img></a></td>
        !           319: <td><a href="javascript:eval(hr[62]);" onMouseOver="display(dt[62],db[62]);"><img border="0" name="b62" src="empty.gif"></img></a></td>
        !           320: <td><a href="javascript:eval(hr[63]);" onMouseOver="display(dt[63],db[63]);"><img border="0" name="b63" src="empty.gif"></img></a></td>
        !           321: </tr>
        !           322: 
        !           323: <tr>
        !           324: <td><a href="javascript:eval(hr[71]);" onMouseOver="display(dt[71],db[71]);"><img border="0" name="b71" src="empty.gif"></img></a></td>
        !           325: <td><a href="javascript:eval(hr[72]);" onMouseOver="display(dt[72],db[72]);"><img border="0" name="b72" src="empty.gif"></img></a></td>
        !           326: <td><a href="javascript:eval(hr[73]);" onMouseOver="display(dt[73],db[73]);"><img border="0" name="b73" src="empty.gif"></img></a></td>
        !           327: </tr>
        !           328: 
        !           329: <tr>
        !           330: <td><a href="javascript:eval(hr[81]);" onMouseOver="display(dt[81],db[81]);"><img border="0" name="b81" src="empty.gif"></img></a></td>
        !           331: <td><a href="javascript:eval(hr[82]);" onMouseOver="display(dt[82],db[82]);"><img border="0" name="b82" src="empty.gif"></img></a></td>
        !           332: <td><a href="javascript:eval(hr[83]);" onMouseOver="display(dt[83],db[83]);"><img border="0" name="b83" src="empty.gif"></img></a></td>
        !           333: </tr>
1.1       www       334: 
1.31    ! www       335: <tr>
        !           336: <td><a href="javascript:eval(hr[91]);" onMouseOver="display(dt[91],db[91]);"><img border="0" name="b91" src="empty.gif"></img></a></td>
        !           337: <td colspan="2"><a href="javascript:eval(hr[92]);" onMouseOver="display(dt[92],db[92]);"><img border="0" name="b92" src="dempty.gif"></img></a></td>
        !           338: </tr>
1.1       www       339: 
1.31    ! www       340: </table>
1.1       www       341: 
                    342: 
                    343: <a href="javascript:defdis();"
                    344:    onMouseOver="defdis();"
1.19      albertel  345: ><img border="0" src="spacer.gif"></img></a><br />
1.1       www       346: 
1.7       www       347: <form name='server' action='/adm/logout' method='post' target='loncapaclient'>
1.17      albertel  348: <input type='hidden' name='postdata' value='none'></input>
1.7       www       349: </form>
1.31    ! www       350: </center>
1.1       www       351: </body>
1.20      www       352: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>