--- loncom/html/res/adm/pages/menu.html 2002/03/19 21:06:24 1.46 +++ loncom/html/res/adm/pages/menu.html 2002/04/04 17:35:57 1.47 @@ -4,7 +4,7 @@ The LearningOnline Network with CAPA Remote Control // -// $Id: menu.html,v 1.46 2002/03/19 21:06:24 www Exp $ +// $Id: menu.html,v 1.47 2002/04/04 17:35:57 matthew Exp $ // // Copyright Michigan State University Board of Trustees // @@ -141,6 +141,8 @@ function deactivate () { function display(utext,ltext) { var i; var ch; this.window.focus(); + if (utext == null) { utext = '';} + if (ltext == null) { ltext = '';} if (typeof(utext)=="undefined") { utext=''; } if (typeof(ltext)=="undefined") { ltext=''; } if ((utext=='') && (ltext=='')) { @@ -196,10 +198,33 @@ function setstatus(tp,bt) { endsend(); } +function cstrgo(currenturl,defaulturl) { + windowcheck(); + var url; + if (currenturl != null && currenturl != '') { + url = currenturl; + var priv_pattern = /^\/priv/; + var tilda_pattern = /^\/~/; + if (priv_pattern.test(url) || tilda_pattern.test(url)) { + url = defaulturl; + } else { + // map /res/103/turtle -> /priv/turtle + url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/'); + } + } else { + url = defaulturl; + } + this.document['led'].src="ledsend.gif"; + if (url != '') { + clientwindow.window.location.href="http://"+clienthost+url; + } +} + function go(url) { windowcheck(); this.document['led'].src="ledsend.gif"; if (url!='') { + currentURL = null; clientwindow.window.location.href="http://"+clienthost+url; } }