--- loncom/html/res/adm/pages/menu.html 2002/05/13 19:18:29 1.51
+++ loncom/html/res/adm/pages/menu.html 2002/05/17 15:09:06 1.53
@@ -4,7 +4,7 @@ The LearningOnline Network with CAPA
Remote Control
//
-// $Id: menu.html,v 1.51 2002/05/13 19:18:29 matthew Exp $
+// $Id: menu.html,v 1.53 2002/05/17 15:09:06 matthew Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -206,10 +206,21 @@ function setstatus(tp,bt) {
endsend();
}
+function is_editable_resource (url) {
+ var Chunks = url.split('.');
+ var tmp = Chunks[Chunks.length-1];
+ if ((Chunks.length > 1) && (Math.floor(tmp) == tmp)) {
+ return true;
+ }
+ return false;
+}
+
function cstrgo(currenturl,defaulturl) {
windowcheck();
var url;
- if (currenturl == null || currenturl == '') {
+ if ((currenturl == null) ||
+ (currenturl == '') ||
+ (! is_editable_resource(currenturl))) {
url = defaulturl;
} else {
url = currenturl;
@@ -230,7 +241,7 @@ function cstrgo(currenturl,defaulturl) {
function go(url) {
windowcheck();
this.document['led'].src="ledsend.gif";
- if (url!='') {
+ if (url!='' && url!= null) {
currentURL = null;
clientwindow.window.location.href="http://"+clienthost+url;
}