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

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

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