version 1.1, 2004/11/17 18:39:20
|
version 1.8, 2009/03/23 22:25:19
|
Line 1
|
Line 1
|
<!-- |
<!-- |
The LearningOnline Network |
The LearningOnline Network |
Resource Assembly Tool |
Resource Assembly Tool |
|
// $Id$ |
// |
// |
// Copyright Michigan State University Board of Trustees |
// Copyright Michigan State University Board of Trustees |
// |
// |
Line 95 var data2=new Array(1024);
|
Line 96 var data2=new Array(1024);
|
var data3=new Array(1024); |
var data3=new Array(1024); |
var data4=new Array(1024); |
var data4=new Array(1024); |
var data5=new Array(1024); |
var data5=new Array(1024); |
|
var data6=new Array(1024); |
|
|
var inf; |
var inf; |
var srch; |
var srch; |
Line 242 function newcondition(content,type) {
|
Line 244 function newcondition(content,type) {
|
} |
} |
|
|
// ---------------------------------------------- Creates a new resource object |
// ---------------------------------------------- Creates a new resource object |
function newresource(rid,cid,text,url,ext,type) { |
function newresource(rid,cid,text,url,ext,type,oldidx) { |
stored=0; |
stored=0; |
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]= |
var newidx=addobj(rid,'b&'+rid+'&'+cid+':0:0:0',url,oldidx); |
|
|
|
objcont[newidx]= |
text+':'+url+':'+ext+':'+type+':res'; |
text+':'+url+':'+ext+':'+type+':res'; |
|
return newidx; |
} |
} |
|
|
|
|
Line 464 function insertport (obj1,d,inout,linkob
|
Line 469 function insertport (obj1,d,inout,linkob
|
|
|
// ---------------------------- Make a new object and add it to the row content |
// ---------------------------- Make a new object and add it to the row content |
// returns object number of generated object |
// returns object number of generated object |
function addobj(kjid,objs) { |
function addobj(kjid,objs,url,oldindex) { |
stored=0; |
stored=0; |
expense++; |
expense++; |
if ((rowcont[kjid]!='') && (typeof(rowcont[kjid])!="undefined")) { |
if ((rowcont[kjid]!='') && (typeof(rowcont[kjid])!="undefined")) { |
rowcont[kjid]+=':'; |
rowcont[kjid]+=':'; |
} |
} |
rowcont[kjid]+=obj.length; |
var newindex=obj.length; |
obj[obj.length]=objs; |
if ((url!='') && (typeof(url)!="undefined")) { |
return obj.length-1; |
// see if we have a zombie with that url and possibly oldindex |
|
for (oidx=0;oidx<objcont.length;oidx++) { |
|
if (typeof(objcont[oidx])!="undefined") { |
|
data6=objcont[oidx].split(':'); |
|
if (data6[4]=='zombie') { |
|
if (data6[1]==url) { |
|
if (typeof(oldindex) == "undefined") { |
|
newindex=oidx; |
|
} else { |
|
if (oidx == oldindex) { |
|
newindex=oidx; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
rowcont[kjid]+=newindex; |
|
obj[newindex]=objs; |
|
return newindex; |
} |
} |
|
|
// ---------------------------------------- Make horizontal connection for hrid |
// ---------------------------------------- Make horizontal connection for hrid |
Line 850 function delres (obj1,recon) {
|
Line 875 function delres (obj1,recon) {
|
for (k=0;k<inwithlink.length;k++) { dellink(inwithlink[k]); } |
for (k=0;k<inwithlink.length;k++) { dellink(inwithlink[k]); } |
for (k=0;k<outwithlink.length;k++) { dellink(outwithlink[k]); } |
for (k=0;k<outwithlink.length;k++) { dellink(outwithlink[k]); } |
delobj(obj1); |
delobj(obj1); |
objcont[obj1]=''; |
// turn into a zombie |
|
data2=objcont[obj1].split(':'); |
|
data2[3]='zombie'; |
|
data2[4]='zombie'; |
|
objcont[obj1]=data2.join(':'); |
|
// reconnect |
if (recon==1) { |
if (recon==1) { |
message("Reconnecting"); |
message("Reconnecting"); |
for (k=0;k<inwithlink.length;k++) { |
for (k=0;k<inwithlink.length;k++) { |
Line 974 function drawcell (rtype,ctype,what,cm,o
|
Line 1004 function drawcell (rtype,ctype,what,cm,o
|
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 width=20 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="'+raticons+'right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
Line 1014 function drawcell (rtype,ctype,what,cm,o
|
Line 1044 function drawcell (rtype,ctype,what,cm,o
|
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 width=20 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="'+raticons+'right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
Line 1050 function drawcell (rtype,ctype,what,cm,o
|
Line 1080 function drawcell (rtype,ctype,what,cm,o
|
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 width=20 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 width=20 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="'+raticons+'right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
Line 1474 function info(infostr) {
|
Line 1504 function info(infostr) {
|
if (mime!='') { |
if (mime!='') { |
inf.document.write |
inf.document.write |
('<br><a target="preview" align="right" href="'+url+ |
('<br><a target="preview" align="right" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif"></a> '); |
'"><img border=0 width=20 src="'+iconpath+mime+'.gif"></a> '); |
} |
} |
inf.document.write('<b>'); |
inf.document.write('<b>'); |
if (data2[2]=='true') { inf.document.write('External '); } |
if (data2[2]=='true') { inf.document.write('External '); } |
Line 1649 function idxopen(mode) {
|
Line 1679 function idxopen(mode) {
|
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); |
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); |
idx.focus(); |
idx.focus(); |
} |
} |
|
// -------------------------------------------------------- Open zombie window |
|
function groupopen(url) { |
|
var options="scrollbars=1,resizable=1,menubar=0"; |
|
idxmode=mode; |
|
idxflag=1; |
|
idx=open("/adm/groupsort?mode=rat&recover=1&readfile="+url,"idxout",options); |
|
idx.focus(); |
|
} |
|
// ------------------------------------------------------- Open bookmark window |
|
function bookmarkopen() { |
|
var options="scrollbars=1,resizable=1,menubar=0"; |
|
idxmode=mode; |
|
idxflag=1; |
|
idx=open("/adm/groupsort?mode=rat&bookmarks=1","idxout",options); |
|
idx.focus(); |
|
} |
// ------------------------------------------------- Open browser to select map |
// ------------------------------------------------- Open browser to select map |
var editbrowser; |
var editbrowser; |
function openbrowser(formname,elementname,only,omit) { |
function openbrowser(formname,elementname,only,omit) { |
Line 2112 function tabledraw() {
|
Line 2158 function tabledraw() {
|
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<a target="preview" align="right" href="'+url+'.meta'+ |
('<a target="preview" align="right" href="'+url+'.meta'+ |
'"><img src="'+iconpath+'meta.gif"></a><p>'+ |
'"><img width=20 src="'+iconpath+'meta.gif"></a><p>'+ |
'<a target="preview" align="right"href="'+url+ |
'<a target="preview" align="right"href="'+url+ |
'"><img src="'+iconpath+mime+'.gif"></a><p>'); |
'"><img width=20 src="'+iconpath+mime+'.gif"></a><p>'); |
} |
} |
parent.mapout.document.write( |
parent.mapout.document.write( |
'<b><a href="javascript:if (parent.code.linkmode!=0) { ' |
'<b><a href="javascript:if (parent.code.linkmode!=0) { ' |
Line 2330 function simpletabledraw() {
|
Line 2376 function simpletabledraw() {
|
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<a target="preview" align="right" href="'+url+'.meta'+ |
('<a target="preview" align="right" href="'+url+'.meta'+ |
'"><img src="'+iconpath+'meta.gif"></a><p>'+ |
'"><img width=20 src="'+iconpath+'meta.gif"></a><p>'+ |
'<a target="preview" align="right"href="'+url+ |
'<a target="preview" align="right"href="'+url+ |
'"><img src="'+iconpath+mime+'.gif"></a><p>'); |
'"><img width=20 src="'+iconpath+mime+'.gif"></a><p>'); |
} |
} |
parent.mapout.document.write('<b>'+k+'</b></td><td bgcolor="'+ck+'">'); |
parent.mapout.document.write('<b>'+k+'</b></td><td bgcolor="'+ck+'">'); |
data2=obj[i].split('&'); |
data2=obj[i].split('&'); |
Line 2727 function schedule(action) {
|
Line 2773 function schedule(action) {
|
|
|
// ----------------------------------------------------- launch indexer browser |
// ----------------------------------------------------- launch indexer browser |
function groupsearch() { |
function groupsearch() { |
srchcheck('groupsearch'); |
srchcheck('import'); |
} |
} |
|
|
function groupimport() { |
function groupimport() { |
idxcheck('groupimport'); |
idxcheck('import'); |
} |
} |
|
|
function groupcopy() { |
function groupcopy() { |
copydxcheck('groupsec'); |
copydxcheck('import'); |
} |
} |
|
|
// -------------------------------------------------------------- Store changes |
// -------------------------------------------------------------- Store changes |