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

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

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