--- loncom/html/res/adm/pages/menu.html 2003/11/10 00:39:28 1.111 +++ loncom/html/res/adm/pages/menu.html 2007/10/30 23:40:49 1.123 @@ -4,7 +4,7 @@ The LearningOnline Network with CAPA Remote Control // -// $Id: menu.html,v 1.111 2003/11/10 00:39:28 www Exp $ +// $Id: menu.html,v 1.123 2007/10/30 23:40:49 albertel Exp $ // // Copyright Michigan State University Board of Trustees // @@ -53,6 +53,10 @@ if (lonhttpdport == null) { var lonhttpdport='8080'; } +var protocol="http://"; +if (lonhttpdport == 443) { + protocol="https://" +} var imgpath=':'+lonhttpdport+'/res/adm/pages/'; var fontpath=':'+lonhttpdport+'/adm/lonLCDfont/'; var currentURL=''; @@ -61,7 +65,6 @@ var currentSymb=''; var reloadSymb=''; var currentStale=1; var menucltim; - var clockdelta=0; var w_extdisp_flag=-1; @@ -81,6 +84,7 @@ var w_bmquery_flag=-1; var w_BookmarkPal_flag=-1; var w_LONcatInfo_flag=-1; var w_LONchat_flag=-1; +var w_loncapanav_flag=-1; // 1 means currently open // 0 means closed (but has been open) // -1 means never yet opened/defined @@ -103,6 +107,7 @@ for (var i=1;i<=3;i++) { var clienthost=window.location.host; var clientwindow=opener; +var navwindow; function syncclock(servertime) { var clientclock=new Date; @@ -141,7 +146,7 @@ function advanceclock() { function windowcheck() { if (clientwindow==null || clientwindow.closed) { - clientwindow=window.open("http://"+clienthost+"/",'', + clientwindow=window.open(protocol+clienthost+"/",'', "height=400,width=440,"+ "scrollbars=1,toolbar=1,status=1,resizable=1,location=1,menubar=1,"+ "left=190,top=15,screenX=190,screenY=15"); @@ -150,9 +155,17 @@ function windowcheck() { extenddispclose(); } +function navwindowcheck() { + if (navwindow==null || navwindow.closed) { + navwindow=window.open(protocol+clienthost+"/adm/navmaps#curloc", + "loncapanav","height=600,width=400,scrollbars=1"); + } +} + function collapse() { if (autologout) { - go('/adm/remote?action=collapse'); + windowcheck(); + clientwindow.location='/adm/remote?action=collapse'; } } @@ -201,7 +214,7 @@ function defdis() { function switchbutton(row,col,imgsrc,texttop,textbot,action,desc) { var idx=10*row+col; - this.document['b'+idx].src="http://"+clienthost+imgpath+imgsrc; + this.document['b'+idx].src=protocol+clienthost+imgpath+imgsrc; hr[idx]=action; dt[idx]=texttop; db[idx]=textbot; @@ -215,7 +228,7 @@ function switchbutton(row,col,imgsrc,tex function clearbut(row,col) { var idx=10*row+col; - this.document['b'+idx].src="http://"+clienthost+imgpath+'empty.gif'; + this.document['b'+idx].src=protocol+clienthost+imgpath+'empty.gif'; hr[idx]='javascript:defdis();'; dt[idx]=''; db[idx]=''; @@ -228,7 +241,7 @@ function clearbut(row,col) { } function setstatus(tp,bt) { - this.document['led'].src="http://"+clienthost+imgpath+"ledblink.gif"; + this.document['led'].src=protocol+clienthost+imgpath+"ledblink.gif"; statustop=tp; statusbot=bt; statuslocked=1; @@ -238,11 +251,12 @@ function setstatus(tp,bt) { function go(url) { windowcheck(); statuslocked=0; - this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; + this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif"; if (url!='' && url!= null) { currentURL = null; currentSymb= null; - this.document.server.action="http://"+clienthost+url; + this.document.server.target='loncapaclient'; + this.document.server.action=protocol+clienthost+url; this.document.server.postdata.value=''; this.document.server.command.value=''; this.document.server.url.value=''; @@ -251,34 +265,55 @@ function go(url) { } } +function gonav(url) { + if (w_loncapanav_flag == 1) { + navwindowcheck(); + statuslocked=0; + this.document.server.target="loncapanav"; + } else { + this.document.server.target="loncapaclient"; + } + this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif"; + if (url!='' && url!= null) { + this.document.server.action=protocol+clienthost+url; + this.document.server.postdata.value=currentURL; + this.document.server.command.value=''; + this.document.server.url.value=''; + this.document.server.postsymb.value=currentSymb; + this.document.server.submit(); + } +} + function gopost(url,postdata,makenewwin) { windowcheck(); statuslocked=0; - this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; + this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif"; if (url!='') { if (makenewwin) { - var LONcomWin=window.open("http://"+clienthost+"/adm/rat/empty.html", + var LONcomWin=window.open(protocol+clienthost+"/adm/rat/empty.html", 'LONcom', - "height=400,width=540,"+ + "height=600,width=600,"+ "scrollbars=1,toolbar=0,status=0,resizable=1,location=0,menubar=0"); this.document.server.target='LONcom'; + } else { + this.document.server.target='loncapaclient'; } - this.document.server.action="http://"+clienthost+url; + this.document.server.action=protocol+clienthost+url; this.document.server.postdata.value=postdata; this.document.server.command.value=''; this.document.server.url.value=''; this.document.server.postsymb.value=''; this.document.server.submit(); - this.document.server.target='loncapaclient'; } } function gocmd(url,cmd) { windowcheck(); statuslocked=0; - this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; + this.document['led'].src=protocol+clienthost+imgpath+"ledsend.gif"; if (url!='') { - this.document.server.action="http://"+clienthost+url; + this.document.server.target='loncapaclient'; + this.document.server.action=protocol+clienthost+url; this.document.server.postdata.value=''; this.document.server.command.value=cmd; this.document.server.url.value=currentURL; @@ -294,8 +329,8 @@ function annotate() { "" +"
" - +"" - +"
"); + +"" + +"<\/form><\/body><\/html>"); annotator.document.close(); } @@ -314,13 +349,13 @@ function set_bookmark() { "
\n " - +"
Link Name:
Link Name:
" - +"
Address:

"); + +"
Address:

<\/center><\/td>" + +"<\/tr><\/table><\/form><\/center><\/body><\/html>"); bmquery.document.close(); } @@ -336,7 +371,7 @@ function extenddispclose() { function extenddisp() { go(''); w_extdisp_flag=1; - extdisp=window.open("http://"+clienthost+"/adm/rat/loading.html", + extdisp=window.open(protocol+clienthost+"/adm/rat/loading.html", "ExtDisp", "scrollbars=1,width=400,height=450"); } @@ -345,45 +380,45 @@ function drawwindow() { extdisp.document.writeln( ''+ - '

LON-CAPA Extended Display Remote Control

'+ - ' + +return ''; +