version 1.66.2.1, 2002/09/09 18:30:19
|
version 1.67, 2002/09/02 19:58:51
|
Line 233 function setstatus(tp,bt) {
|
Line 233 function setstatus(tp,bt) {
|
} |
} |
|
|
function is_editable_resource (url) { |
function is_editable_resource (url) { |
// figure out if this a specific resource version |
|
var Chunks = url.split('.'); |
var Chunks = url.split('.'); |
var tmp = Chunks[Chunks.length-1]; |
var tmp = Chunks[Chunks.length-1]; |
if ((Chunks.length > 1) && (Math.floor(tmp) == tmp)) { |
if ((Chunks.length > 1) && (Math.floor(tmp) == tmp)) { |
return false; |
return true; |
} |
} |
// see if this is actually in resource space |
return false; |
var SlashChunks=url.split('/'); |
|
if (SlashChunks[1]!='res') { return false; } |
|
return true; |
|
} |
} |
|
|
function cstrgo(currenturl,defaulturl) { |
function cstrgo(currenturl,defaulturl) { |
Line 253 function cstrgo(currenturl,defaulturl) {
|
Line 249 function cstrgo(currenturl,defaulturl) {
|
(! is_editable_resource(currenturl))) { |
(! is_editable_resource(currenturl))) { |
url = defaulturl; |
url = defaulturl; |
} else { |
} else { |
var SlashChunks=currenturl.split('/'); |
url = currenturl; |
SlashChunks[1]='priv'; |
var res_pattern = /^\/res\/[A-z0-p]+\//; |
var i; |
if (res_pattern.test(url)) { |
for (i=2;i<SlashChunks.length;i++) { |
// map /res/103/turtle to /priv/turtle |
SlashChunks[i]=SlashChunks[i+1]; |
url = url.replace(/^\/res\/[A-z0-9]+\//,'/priv/'); |
|
} else { |
|
url = defaulturl; |
} |
} |
SlashChunks.length--; |
|
url=SlashChunks.join('/'); |
|
} |
} |
this.document['led'].src="ledsend.gif"; |
this.document['led'].src="ledsend.gif"; |
if (url != '') { |
if (url != '') { |
Line 348 function edit_bookmarks() {
|
Line 344 function edit_bookmarks() {
|
function catalog_info() { |
function catalog_info() { |
go(''); |
go(''); |
w_LONcatInfo_flag=1; |
w_LONcatInfo_flag=1; |
loncatinfo=window.open(clientwindow.window.location.href+'.meta',"LONcatInfo"); |
loncatinfo=window.open(clientwindow.window.location.pathname+'.meta',"LONcatInfo"); |
} |
} |
// --> |
// --> |
</script> |
</script> |