--- loncom/html/res/adm/pages/menu.html 2001/03/21 15:56:57 1.23 +++ loncom/html/res/adm/pages/menu.html 2001/06/02 16:07:19 1.31 @@ -9,6 +9,9 @@ Jan Guy Albertelli 5/1/1 Gerd Kortemeyer 2/19 Guy Albertelli 3/21 Gerd Kortemeyer +4/30 Ben Tyszka +5/2 Scott Harrison +5/4,5/9,5/28,5/30,6/1,6/2 Gerd Kortemeyer --> LON-CAPA Remote @@ -27,6 +30,31 @@ statustop=''; statusbot=''; active=0; +imgpath='/res/adm/pages/'; + +var currentURL=''; +var currentStale=1; + +// not used (yet) +// var w_Annotator; +// var w_bmquery; +// var w_BookmarkPal; +// var w_LONcatInfo; + +////////////////////////////////////// +var w_Annotator_flag=-1; +var w_bmquery_flag=-1; +var w_BookmarkPal_flag=-1; +var w_LONcatInfo_flag=-1; + // 1 means currently open + // 0 means closed (but has been open) + // -1 means never yet opened/defined +/////////////////////////////////////// + +hr=new Array; +db=new Array; +dt=new Array; + clienthost=window.location.host; clientwindow=opener; @@ -41,12 +69,54 @@ function logout () { windowcheck(); if (clientwindow.status!='MenuControl:nologout') { + if (w_Annotator_flag!=-1 && annotator && !annotator.closed) { + annotator.close(); + } + if (w_bmquery_flag!=-1 && bmquery && !bmquery.closed) { + bmquery.close(); + } + if (w_BookmarkPal_flag!=-1 && bookmarkpal && !bookmarkpal.closed) { + bookmarkpal.close(); + } + if (w_LONcatInfo_flag!=-1 && loncatinfo && !loncatinfo.closed) { + loncatinfo.close(); + } clientwindow.window.location.href="http://"+clienthost+"/adm/logout"; } } +function checkurl () { + if (currentURL) { + if (currentStale) { + clearbut(2,1); + clearbut(2,3); + clearbut(8,1); + clearbut(8,2); + clearbut(8,3); + switchbutton(3,1,'reload.gif','return','location','go(currentURL)'); + } else { + clearbut(3,1); + switchbutton(8,1,'eval.gif','evaluate','this','gopost("/adm/evaluate",currentURL)'); + switchbutton(8,2,'fdbk.gif','feedback','on this','gopost("/adm/feedback",currentURL)'); + switchbutton(8,3,'prt.gif','prepare','printout','gopost("/adm/printout",currentURL)'); + switchbutton(2,1,'back.gif','backward','','gopost("/adm/flip","back:"+currentURL)'); + switchbutton(2,3,'forw.gif','forward','','gopost("/adm/flip","forward:"+currentURL)'); + } + } else { + clearbut(2,1); + clearbut(2,3); + clearbut(3,1); + clearbut(8,1); + clearbut(8,2); + clearbut(8,3); + } + setTimeout('checkurl();',500); +} + function activate () { + opener.menuloaded=1; setTimeout('active=1;',2000); + setTimeout('checkurl();',1500); } function deactivate () { @@ -56,6 +126,12 @@ function deactivate () { function display(utext,ltext) { var i; var ch; this.window.focus(); + if (utext==undefined) { utext=''; } + if (ltext==undefined) { ltext=''; } + if ((utext=='') && (ltext=='')) { + utext=statustop; + ltext=statusbot; + } if (active) { for (i=0;i<=7;i++) { if (i" @@ -120,25 +213,41 @@ function annotate() { function set_bookmark() { go(''); - prompt("Please enter a name for this bookmark.", - clientwindow.window.location.href); + clienttitle="Enter Title"; + clienthref="Enter Address"; + w_bmquery_flag=1; + bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0'); + bmquery.document.write( + "
\n " + +"
Link Name:
" + +"
Address:

"); + bmquery.document.close(); } function edit_bookmarks() { go(''); - window.open("http://"+clienthost+"/adm/bookmarks", + w_BookmarkPal_flag=1; + bookmarkpal=window.open("http://"+clienthost+"/adm/bookmarks", "BookmarkPal", "width=400,height=505,scrollbars=0"); } function catalog_info() { go(''); - window.open(clientwindow.window.location.href+'.meta',"LONcatInfo"); + w_LONcatInfo_flag=1; + loncatinfo=window.open(clientwindow.window.location.href+'.meta',"LONcatInfo"); } // -->
- +

-
+ -
+ + + + -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+