--- loncom/html/res/adm/pages/menu.html 2004/08/13 20:30:01 1.113 +++ loncom/html/res/adm/pages/menu.html 2007/08/30 22:56:32 1.121 @@ -4,7 +4,7 @@ The LearningOnline Network with CAPA Remote Control // -// $Id: menu.html,v 1.113 2004/08/13 20:30:01 albertel Exp $ +// $Id: menu.html,v 1.121 2007/08/30 22:56:32 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=''; @@ -142,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"); @@ -153,7 +157,7 @@ function windowcheck() { function navwindowcheck() { if (navwindow==null || navwindow.closed) { - navwindow=window.open("http://"+clienthost+"/adm/navmaps#curloc", + navwindow=window.open(protocol+clienthost+"/adm/navmaps#curloc", "loncapanav","height=600,width=400,scrollbars=1"); } } @@ -209,7 +213,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; @@ -223,7 +227,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]=''; @@ -236,7 +240,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; @@ -246,12 +250,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.target='loncapaclient'; - this.document.server.action="http://"+clienthost+url; + this.document.server.action=protocol+clienthost+url; this.document.server.postdata.value=''; this.document.server.command.value=''; this.document.server.url.value=''; @@ -261,39 +265,39 @@ function go(url) { } function gonav(url) { - if (w_loncapanav_flag != 1) { - go(url); - } else { + if (w_loncapanav_flag == 1) { navwindowcheck(); statuslocked=0; - this.document['led'].src="http://"+clienthost+imgpath+"ledsend.gif"; - if (url!='' && url!= null) { - this.document.server.action="http://"+clienthost+url; - this.document.server.target="loncapanav"; - this.document.server.postdata.value=''; - this.document.server.command.value=''; - this.document.server.url.value=''; - this.document.server.postsymb.value=''; - this.document.server.submit(); - } + 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=''; @@ -305,10 +309,10 @@ function gopost(url,postdata,makenewwin) 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.target='loncapaclient'; - this.document.server.action="http://"+clienthost+url; + this.document.server.action=protocol+clienthost+url; this.document.server.postdata.value=''; this.document.server.command.value=cmd; this.document.server.url.value=currentURL; @@ -324,7 +328,7 @@ function annotate() { "
" +""); annotator.document.close(); } @@ -366,7 +370,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"); } @@ -398,20 +402,20 @@ function drawwindow() { function edit_bookmarks() { go(''); w_BookmarkPal_flag=1; - bookmarkpal=window.open("http://"+clienthost+"/adm/bookmarks", + bookmarkpal=window.open(protocol+clienthost+"/adm/bookmarks", "BookmarkPal", "width=400,height=505,scrollbars=0"); } function catalog_info() { go(''); w_LONcatInfo_flag=1; - loncatinfo=window.open(clientwindow.window.location.pathname+'.meta',"cat",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); + loncatinfo=window.open(clientwindow.window.location.pathname+'.meta',"cat",'height=420,width=480,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); } function chat_win() { go(''); w_LONchat_flag=1; - lonchat=window.open('/res/adm/pages/chatroom.html',"LONchat",'height=320,width=280,resizable=yes,location=no,menubar=no,toolbar=no'); + lonchat=window.open('/res/adm/pages/chatroom.html',"LONchat",'height=420,width=480,resizable=yes,location=no,menubar=no,toolbar=no'); } // --> @@ -468,7 +472,7 @@ function showdisplay(utext,ltext) { if (ch==':') { ch='colon'; } if (ch=='/') { ch='slash'; } } else { ch='space'; } - this.document['i'+i].src="http://"+clienthost+fontpath+ch+'.gif'; + this.document['i'+i].src=protocol+clienthost+fontpath+ch+'.gif'; } for (i=0;i<=7;i++) { if (i