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

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

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