version 1.3, 2000/05/25 12:14:01
|
version 1.4, 2000/06/08 16:19:50
|
Line 8 Resource Assembly Tool
|
Line 8 Resource Assembly Tool
|
9/1,9/2,9/4,9/5,9/6, |
9/1,9/2,9/4,9/5,9/6, |
1/7,1/8,1/10,1/14,1/15,1/16,1/21,1/22,1/29,1/30,1/31, |
1/7,1/8,1/10,1/14,1/15,1/16,1/21,1/22,1/29,1/30,1/31, |
2/2,2/3,2/10,2/12,2/13,2/14,2/15,2/17,2/18,2/19,2/20,2/21,2/22, |
2/2,2/3,2/10,2/12,2/13,2/14,2/15,2/17,2/18,2/19,2/20,2/21,2/22, |
5/2,5/3,5/4,5/5,5/6,5/8,5/9,5/13,5/18,5/20,5/22,5/24 |
5/2,5/3,5/4,5/5,5/6,5/8,5/9,5/13,5/18,5/20,5/22,5/24,5/25, |
|
6/7,6/8 |
Gerd Kortemeyer with Scott Harrison |
Gerd Kortemeyer with Scott Harrison |
--> |
--> |
|
|
Line 49 var graphdef='no';
|
Line 50 var graphdef='no';
|
var mainrun=0; |
var mainrun=0; |
var tablemode=0; |
var tablemode=0; |
var mostrecent=0; |
var mostrecent=0; |
|
var zscale=3; |
|
|
var disrows=0; |
var disrows=0; |
var discols=0; |
var discols=0; |
Line 535 function delcond(obj1,colid) {
|
Line 537 function delcond(obj1,colid) {
|
obj[obj1]=data3[0]+'&'+data3[1]; |
obj[obj1]=data3[0]+'&'+data3[1]; |
for (k=2;k<data3.length;k++) { |
for (k=2;k<data3.length;k++) { |
data4=data3[k].split(':'); |
data4=data3[k].split(':'); |
if (data4[0]==colid) { data4[3]=0; } |
if (data4[0]==colid) { |
|
data4[3]=0; |
|
objlinks[data4[2]]=(objlinks[data4[2]].split(':'))[0]+':'+ |
|
(objlinks[data4[2]].split(':'))[1]+':0'; |
|
} |
if ((data4[1]!=0) || (data4[2]!=0) || (data3.length==3)) { |
if ((data4[1]!=0) || (data4[2]!=0) || (data3.length==3)) { |
obj[obj1]+='&'+data4[0]+':'+data4[1]+':'+data4[2]+':'+data4[3]; |
obj[obj1]+='&'+data4[0]+':'+data4[1]+':'+data4[2]+':'+data4[3]; |
} |
} |
Line 827 function delres (obj1,recon) {
|
Line 833 function delres (obj1,recon) {
|
|
|
function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { |
function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { |
var bgcolor; |
var bgcolor; |
|
if ((what=='') && (ne==0)) { cm="#DDDDDD"; } |
if (ctype!=0) { |
if (ctype!=0) { |
parent.mapout.document.write('<td bgcolor='+cm+' width='+cw[ctype]+'>'); |
parent.mapout.document.write('<td bgcolor='+cm+' width='+cw[ctype]+'>'); |
if (what!='') { |
if (what!='') { |
Line 838 function drawcell (rtype,ctype,what,cm,o
|
Line 845 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
if (what=='r:') { |
if (what=='r:') { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 src="resource.gif">'); |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
|
+' src="resource.gif">'); |
} else { |
} else { |
if (what=='c:') { |
if (what=='c:') { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 src="condition.gif">'); |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
|
+' src="condition.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 src="'+rtype+'.'+ctype+'.'+what+'.gif">'); |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype]+' src="' |
|
+rtype+'.'+ctype+'.'+what+'.gif">'); |
} |
} |
} |
} |
if (obj1!='') { |
if (obj1!='') { |
Line 862 function drawcell (rtype,ctype,what,cm,o
|
Line 872 function drawcell (rtype,ctype,what,cm,o
|
parent.mapout.document.write |
parent.mapout.document.write |
('onMouseOver="parent.code.infoclear();">'); |
('onMouseOver="parent.code.infoclear();">'); |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 src="'+rtype+'.'+ctype+'.empty.gif"></a>'); |
( |
|
'<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
|
+' src="'+rtype+'.'+ctype+'.empty.gif"></a>'); |
} |
} |
parent.mapout.document.write('</td>'); |
parent.mapout.document.write('</td>'); |
} |
} |
} |
} |
|
|
|
// --------------------------------------------------------- Color of resources |
|
|
|
function rescolor (ext,typ) { |
|
var rc; var gc; var bc; |
|
if (ext=='true') { bc='55'; } else { bc='99'; } |
|
if (typ=='mandatory') { rc='FF'; } else { rc='BB'; } |
|
if (typ=='optional') { gc='BB'; } else { gc='FF'; } |
|
if ((typ=='start') || (typ=='end')) { rc='AA'; gc='AA'; bc='FF'; } |
|
return '#'+rc+gc+bc; |
|
} |
|
|
|
// -------------------------------------------------------- Color of conditions |
|
|
|
function condcolor(typ) { |
|
if (typ=='stop') { return '#EEAAAA'; } |
|
if (typ=='force') { return '#AAAAEE'; } |
|
return '#EEEEAA'; |
|
} |
|
|
// ----------------------------------------------------------------- Draw a row |
// ----------------------------------------------------------------- Draw a row |
|
|
function drawrow (jid) { |
function drawrow (jid) { |
var j; var jk; var k; var rc; var gc; var bc; var ck; |
var j; var jk; var k; var ck; |
var objd1=new Array(); |
var objd1=new Array(); |
var objd2=new Array(); |
var objd2=new Array(); |
var notempty=new Array(); |
var notempty=new Array(); |
Line 890 if (rowtype[jid]!=0) {
|
Line 921 if (rowtype[jid]!=0) {
|
data3=obj[data2[jk]].split('&'); |
data3=obj[data2[jk]].split('&'); |
if (data3[0]=='b') { |
if (data3[0]=='b') { |
data1=objcont[data2[jk]].split(':'); |
data1=objcont[data2[jk]].split(':'); |
if (data1[2]=='true') { bc='55'; } else { bc='11'; } |
ck=rescolor(data1[2],data1[3]); |
if (data1[3]=='mandatory') { rc='BB'; } else { rc='55'; } |
|
if (data1[3]=='optional') { gc='66'; } else { gc='AA'; } |
|
ck='#'+rc+gc+bc; |
|
left=maxcol; |
left=maxcol; |
leftin=maxcol; |
leftin=maxcol; |
leftout=maxcol; |
leftout=maxcol; |
Line 917 if (rowtype[jid]!=0) {
|
Line 945 if (rowtype[jid]!=0) {
|
if (data1[3]!=0) { |
if (data1[3]!=0) { |
colmap3[thiscol]='c:'; |
colmap3[thiscol]='c:'; |
condtype=(objcont[data1[3]].split(':'))[1]; |
condtype=(objcont[data1[3]].split(':'))[1]; |
colmap6[thiscol]='#FFFFAA'; |
colmap6[thiscol]=condcolor(condtype); |
if (condtype=='stop') { colmap6[thiscol]='#FFAAAA'; } |
|
if (condtype=='force') { colmap6[thiscol]='#AAAAFF'; } |
|
objd2[thiscol]='c&' |
objd2[thiscol]='c&' |
+data1[0]+'&'+data2[jk]+'&'+data1[2]+'&'+data1[3]; |
+data1[0]+'&'+data2[jk]+'&'+data1[2]+'&'+data1[3]; |
} else { |
} else { |
Line 1011 if (rowtype[jid]!=0) {
|
Line 1037 if (rowtype[jid]!=0) {
|
} else { |
} else { |
colmap[left]='rd'; colmap2[left]='utd'; colmap3[left]='utd'; |
colmap[left]='rd'; colmap2[left]='utd'; colmap3[left]='utd'; |
} |
} |
|
notempty[left]=1; |
|
notempty[right]=1; |
for (k=left+1;k<right;k++) { |
for (k=left+1;k<right;k++) { |
|
notempty[k]=1; |
if (colmap[k]=='') { |
if (colmap[k]=='') { |
colmap[k]=thisarrow; |
colmap[k]=thisarrow; |
objd1[k]=data2[jk]; |
objd1[k]=data2[jk]; |
Line 1080 function draw () {
|
Line 1109 function draw () {
|
save(); |
save(); |
|
|
rh[0]=0; |
rh[0]=0; |
rh[1]=30; |
rh[1]=zscale*10; |
rh[2]=60; |
rh[2]=zscale*20; |
cw[0]=0; |
cw[0]=0; |
cw[1]=30; |
cw[1]=zscale*10; |
cw[2]=60; |
cw[2]=zscale*20; |
parent.mapout.document.clear(); |
|
parent.mapout.document.open('text/html','replace'); |
parent.mapout.document.open('text/html','replace'); |
parent.mapout.document.writeln('<html><body bgcolor="#FFFFFF">'); |
parent.mapout.document.writeln('<html><body bgcolor="#FFFFFF">'); |
|
|
Line 1093 function draw () {
|
Line 1122 function draw () {
|
if (graphdef=='no') { graphopt(); cleanup(); } |
if (graphdef=='no') { graphopt(); cleanup(); } |
for (k=0;k<=maxrow;k++) { rrow[row[k]]=k; } |
for (k=0;k<=maxrow;k++) { rrow[row[k]]=k; } |
for (k=0;k<=maxcol;k++) { rcol[col[k]]=k; } |
for (k=0;k<=maxcol;k++) { rcol[col[k]]=k; } |
parent.mapout.document.writeln( |
parent.mapout.document.writeln( |
'<table cellpadding=0 cellspacing=0 border=0 rows=' |
'<table cellpadding=0 cellspacing=0 border=0 rows=' |
+disrows+' cols='+discols+'>'); |
+disrows+' cols='+discols+'>'); |
for (kr=0;kr<=maxrow;kr++) { |
for (kr=0;kr<=maxrow;kr++) { |
message("Generating Output Row "+kr); |
message("Generating Output Row "+kr); |
drawrow(rrow[kr]); |
drawrow(rrow[kr]); |
} |
} |
} else { |
} else { |
message("Generating Table Output"); |
message("Generating Table Output"); |
|
for (k=0;k<=maxrow;k++) { rrow[row[k]]=k; } |
|
for (k=0;k<=maxcol;k++) { rcol[col[k]]=k; } |
|
|
parent.mapout.document.writeln( '<table>'); |
parent.mapout.document.writeln( '<table>'); |
tabledraw(); |
if (tablemode==1) { |
|
tabledraw(); |
|
} else { |
|
simpletabledraw(); |
|
} |
} |
} |
|
|
parent.mapout.document.writeln('</table>'); |
parent.mapout.document.writeln('</table>'); |
Line 1124 function infoclear() {
|
Line 1160 function infoclear() {
|
('<html><body bgcolor="#FFFFFF"><table><tr><td>'+ |
('<html><body bgcolor="#FFFFFF"><table><tr><td>'+ |
'<img src="/adm/lonIcons/lonlogos.gif"></td>'); |
'<img src="/adm/lonIcons/lonlogos.gif"></td>'); |
if (linkmode!=0) { |
if (linkmode!=0) { |
|
if (tablemode==0) { |
inf.document.writeln( |
inf.document.writeln( |
'<td><b>Link Mode</b><hr>Click on a resource to link it with<br><b>'+ |
'<td><b>Link Mode</b><hr>Click on a resource to link it with<br><b>'+ |
(objcont[linkmode].split(':'))[0]+ |
(objcont[linkmode].split(':'))[0]+ |
'</b><br>click anywhere else to cancel.</td>'); |
'</b><br>click anywhere else to cancel.</td>'); |
|
} else { |
|
inf.document.writeln( |
|
'<td><b>Link Mode</b><hr>Click on a resource number to link it with<br><b>'+ |
|
(objcont[linkmode].split(':'))[0]+'</b><br>'+ |
|
'<a href="javascript:opener.linkmode=0;opener.notclear=0;opener.infoclear();">' |
|
+'Cancel</a></td>'); |
|
} |
} else { |
} else { |
|
if (tablemode==0) { |
inf.document.writeln( |
inf.document.writeln( |
'<td><b>Click to Edit</b><hr>Click to insert resources, columns and rows</td>' |
'<td><b>Click to Edit</b><hr>Click in a light gray area<br>' |
|
+'to insert resources, columns and rows</td>' |
); |
); |
|
} |
} |
} |
inf.document.writeln('</tr></table></body></html>'); |
inf.document.writeln('</tr></table></body></html>'); |
inf.document.close(); |
inf.document.close(); |
Line 1498 function save() {
|
Line 1545 function save() {
|
'<&>maxcol<:>'+maxcol; |
'<&>maxcol<:>'+maxcol; |
parent.server.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>maxrow<:>'+maxrow; |
'<&>maxrow<:>'+maxrow; |
} else { |
parent.server.document.forms.storage.output.value+= |
|
'<&>zscale<:>'+zscale; |
|
} else { |
parent.server.document.forms.storage.output.value='graphdef<:>no'; |
parent.server.document.forms.storage.output.value='graphdef<:>no'; |
} |
} |
parent.server.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
Line 1525 function save() {
|
Line 1574 function save() {
|
|
|
function graphreset() { |
function graphreset() { |
|
|
|
var k; |
|
|
|
for (k=0;k<obj.length;k++) { obj[k]=''; } |
obj.length=0; |
obj.length=0; |
obj[0]=''; |
obj[0]=''; |
obj[1]='e&1'; |
|
|
|
rowcont.length=0; |
rowcont.length=0; |
rowcont[0]=''; |
rowcont[0]=''; |
rowcont[1]='1'; |
|
row.length=0; |
row.length=0; |
row[0]=0; |
row[0]=0; |
row[1]=1; |
maxrow=0; |
maxrow=1; |
|
|
|
col.length=0; |
col.length=0; |
colmap.length=0; |
colmap.length=0; |
maxcol=-1; |
maxcol=-1; |
insertcol(-1); |
insertcol(-1); |
insertcol(0); |
|
|
objcont[0]=''; |
|
objcont[1]='Start::false:start:res' |
|
objcont[2]='Finish::false:end:res'; |
|
objlinks[0]=''; |
|
objlinks[1]='1:2:0'; |
|
|
graphdef='no'; |
graphdef='no'; |
|
|
Line 1569 function rescompare(a,b) {
|
Line 1624 function rescompare(a,b) {
|
function tabledraw() { |
function tabledraw() { |
var objsorted=new Array(); |
var objsorted=new Array(); |
var robjs=new Array(); |
var robjs=new Array(); |
|
var iobjs=new Array(); |
var k; |
var k; |
var i; |
var i; |
var j; |
var j; |
var nr; |
var nr; |
var bc; var rc; var gc; var ck; |
var ck; |
|
var cck; |
|
var condid; |
var sortstr=sortobjs(); |
var sortstr=sortobjs(); |
|
insrestab(1,-1,-1); |
if (sortstr!='') { |
if (sortstr!='') { |
objsorted=sortstr.split('&'); |
objsorted=sortstr.split('&'); |
for (k=0;k<objsorted.length;k++) { |
for (k=0;k<objsorted.length;k++) { |
robjs[objsorted[k]]=k; |
i=(objsorted[k].split(':'))[0]; |
|
iobjs[k]=i; |
|
robjs[i]=k; |
} |
} |
for (k=0;k<objsorted.length;k++) { |
for (k=0;k<iobjs.length;k++) { |
i=(objsorted[k].split(':'))[0]; |
i=iobjs[k]; |
if (k<objsorted.length-1) { |
if (k<objsorted.length-1) { |
nr=(objsorted[k+1].split(':'))[0]; |
nr=iobjs[k+1]; |
} else { |
} else { |
nr=-1; |
nr=-1; |
} |
} |
data1=objcont[i].split(':'); |
data1=objcont[i].split(':'); |
if (data1[2]=='true') { bc='55'; } else { bc='11'; } |
ck=rescolor(data1[2],data1[3]); |
if (data1[3]=='mandatory') { rc='BB'; } else { rc='55'; } |
|
if (data1[3]=='optional') { gc='66'; } else { gc='AA'; } |
|
ck='#'+rc+gc+bc; |
|
parent.mapout.document.write('<tr><td bgcolor="'+ck |
parent.mapout.document.write('<tr><td bgcolor="'+ck |
+'"><b>'+k+'</td><td bgcolor="'+ck |
+'"><b><a href="javascript:if (parent.code.linkmode!=0) { ' |
|
+'parent.code.joinres(parent.code.linkmode,'+i+',0);' |
|
+'parent.code.linkmode=0;parent.code.editmode=0;' |
|
+'parent.code.notclear=0;parent.code.infoclear();' |
|
+'parent.code.draw(); }">'+k+'</a></b></td><td bgcolor="'+ck |
+'"><form name=r'+i+' method=post>'); |
+'"><form name=r'+i+' method=post>'); |
data2=obj[i].split('&'); |
data2=obj[i].split('&'); |
parent.mapout.document.write('<table bgcolor="#CCCCCC">'); |
parent.mapout.document.write('<table bgcolor="#CCCCCC">'); |
parent.mapout.document.write( |
parent.mapout.document.write( |
'<tr><td>Title:</td><td><input type=text name=t size=30 value="' |
'<tr><td>Title:</td><td><input type=text name=t size=50 value="' |
+data1[0]+'"></td></tr>'); |
+data1[0]+'"></td></tr>'); |
parent.mapout.document.write( |
parent.mapout.document.write( |
'<tr><td>URL:</td><td><input type=text name=u size=30 value="' |
'<tr><td>URL:</td><td><input type=text name=u size=50 value="' |
+data1[1]+'"></td></tr>' |
+data1[1]+'"></td></tr>' |
+'<tr><td>External:</td><td><input type=checkbox name=e'); |
+'<tr><td>External:</td><td><input type=checkbox name=e'); |
if (data1[2]=='true') { parent.mapout.document.write(' checked'); } |
if (data1[2]=='true') { parent.mapout.document.write(' checked'); } |
Line 1632 function tabledraw() {
|
Line 1694 function tabledraw() {
|
+';parent.code.draw();">' |
+';parent.code.draw();">' |
+'<b>Change to above values</b></a> ' |
+'<b>Change to above values</b></a> ' |
+' <a href="javascript:parent.mapout.document.forms.r'+i |
+' <a href="javascript:parent.mapout.document.forms.r'+i |
+'.reset()">Reset</a><br><table><tr>'); |
+'.reset()">Reset</a></td></tr><tr><td colspan=2>' |
|
+'<A href="javascript:parent.code.notclear=0;parent.code.infoclear();' |
|
+'parent.code.delres('+i+',0);parent.code.editmode=0;parent.code.draw();">' |
|
+'Delete Resource (cutting links)</A><br>' |
|
+'<A href="javascript:parent.code.notclear=0;parent.code.infoclear();' |
|
+'parent.code.delres('+i+',1);parent.code.editmode=0;parent.code.draw();">' |
|
+'Delete Resource (preserving links)</A><br>' |
|
+'<a href="javascript:parent.code.linkmode='+i+ |
|
';parent.code.notclear=0;parent.code.infoclear();">'+ |
|
'Link resource</a></td></tr>'); |
|
|
|
parent.mapout.document.writeln('<tr><td colspan=2><table><tr>'); |
for (j=2;j<data2.length;j++) { |
for (j=2;j<data2.length;j++) { |
data3=objlinks[(data2[j].split(':'))[2]].split(':'); |
data4=data2[j].split(':'); |
|
data3=objlinks[data4[2]].split(':'); |
if (data3.length>1) { |
if (data3.length>1) { |
if (data3[1]==nr) { |
if (data3[1]==nr) { |
parent.mapout.document.writeln('<td>Next<br>'+data3); |
cck='#AAAAAA'; |
|
if (data3[2]!=0) { |
|
cck=condcolor((objcont[data3[2]].split(':'))[1]); |
|
condid=data3[2]; |
|
} else { |
|
condid='-'; |
|
} |
|
parent.mapout.document.writeln( |
|
'<td bgcolor='+cck+'>Next<br>'); |
|
parent.mapout.document.writeln( |
|
'<a href="javascript:parent.code.handler('+ |
|
"'c&"+data4[0]+'&'+i+'&'+data4[2]+'&'+condid+"');" |
|
+'">Edit</a>'); |
parent.mapout.document.writeln('</td>'); |
parent.mapout.document.writeln('</td>'); |
} |
} |
} |
} |
} |
} |
for (j=2;j<data2.length;j++) { |
for (j=2;j<data2.length;j++) { |
data3=objlinks[(data2[j].split(':'))[2]].split(':'); |
data4=data2[j].split(':'); |
|
data3=objlinks[data4[2]].split(':'); |
if (data3.length>1) { |
if (data3.length>1) { |
if ((data3[1]!=nr) && (data3[1]!=0)) { |
if ((data3[1]!=nr) && (data3[1]!=0)) { |
|
cck='#AAAAAA'; |
|
if (data3[2]!=0) { |
|
cck=condcolor((objcont[data3[2]].split(':'))[1]); |
|
condid=data3[2]; |
|
} else { |
|
condid='-'; |
|
} |
parent.mapout.document.writeln( |
parent.mapout.document.writeln( |
'<td>To: '+robjs[data3[1]]+'<br>'); |
'<td bgcolor='+cck+'>To: '+robjs[data3[1]]+'<br>'); |
|
parent.mapout.document.writeln( |
|
'<a href="javascript:parent.code.handler('+ |
|
"'c&"+data4[0]+'&'+i+'&'+data4[2]+'&'+condid+"');" |
|
+'">Edit</a>'); |
parent.mapout.document.writeln('</td>'); |
parent.mapout.document.writeln('</td>'); |
} |
} |
} |
} |
} |
} |
parent.mapout.document.writeln( |
parent.mapout.document.writeln( |
'</tr></table></td></tr></table></form></td></tr>'); |
'</tr></table></td></tr></table></form>'); |
|
insrestab(rrow[data2[1]],i,nr); |
|
|
} |
} |
} |
} |
} |
} |
|
|
|
// ----------------------------------------------------- Insert Resource Output |
|
|
|
function insrestab(irow,be,af) { |
|
parent.mapout.document.writeln('<tr><td colspan=2>'+ |
|
'<table><tr><td><a href="javascript:parent.code.insertrow(' |
|
+irow+');parent.code.newresource(parent.code.maxrow,'+rcol[1] |
|
+",'','','false','normal');parent.code.mostrecent=parent.code.obj.length-1;" |
|
+'parent.code.draw();">' |
|
+'Insert resource</a></td><td>'); |
|
if (be!=-1) { |
|
parent.mapout.document.writeln( |
|
'<a href="javascript:parent.code.insertrow(' |
|
+irow+');parent.code.newresource(parent.code.maxrow,'+rcol[0] |
|
+",'','','false','normal');parent.code.mostrecent=parent.code.obj.length-1;" |
|
+'parent.code.joinres('+be+',parent.code.mostrecent,0);' |
|
+'parent.code.draw();">' |
|
+'Insert resource linked to from above</a><br>'); |
|
} |
|
if ((be!=-1) && (af!=-1)) { |
|
parent.mapout.document.writeln( |
|
'<a href="javascript:parent.code.insertrow(' |
|
+irow+');parent.code.newresource(parent.code.maxrow,'+rcol[0] |
|
+",'','','false','normal');parent.code.mostrecent=parent.code.obj.length-1;" |
|
+'parent.code.joinres('+be+',parent.code.mostrecent,0);' |
|
+'parent.code.joinres(parent.code.mostrecent,'+af+',0);' |
|
+'parent.code.draw();">' |
|
+'Insert resource linked to from above and linking to below</a><br>'); |
|
} |
|
if (af!=-1) { |
|
parent.mapout.document.writeln( |
|
'<a href="javascript:parent.code.insertrow(' |
|
+irow+');parent.code.newresource(parent.code.maxrow,'+rcol[0] |
|
+",'','','false','normal');parent.code.mostrecent=parent.code.obj.length-1;" |
|
+'parent.code.joinres(parent.code.mostrecent,'+af+',0);' |
|
+'parent.code.draw();">' |
|
+'Insert resource linking to below</a><br>'); |
|
} |
|
parent.mapout.document.writeln('</td></tr></table></tr>'); |
|
} |
|
// ---------------------------------------- Draw simple table instead of graph |
|
|
|
function simpletabledraw() { |
|
var objsorted=new Array(); |
|
var robjs=new Array(); |
|
var iobjs=new Array(); |
|
var k; |
|
var i; |
|
var j; |
|
var nr; |
|
var ck; |
|
var cck; |
|
var condid; |
|
var sortstr=sortobjs(); |
|
if (sortstr!='') { |
|
objsorted=sortstr.split('&'); |
|
for (k=0;k<objsorted.length;k++) { |
|
i=(objsorted[k].split(':'))[0]; |
|
iobjs[k]=i; |
|
robjs[i]=k; |
|
} |
|
for (k=0;k<iobjs.length;k++) { |
|
i=iobjs[k]; |
|
if (k<objsorted.length-1) { |
|
nr=iobjs[k+1]; |
|
} else { |
|
nr=-1; |
|
} |
|
data1=objcont[i].split(':'); |
|
ck=rescolor(data1[2],data1[3]); |
|
parent.mapout.document.write('<tr><td bgcolor="'+ck |
|
+'"><b>'+k+'</b></td><td bgcolor="'+ck |
|
+'">'); |
|
data2=obj[i].split('&'); |
|
parent.mapout.document.write('<table>'); |
|
parent.mapout.document.write( |
|
'<tr><td>Title:</td><td>'+data1[0]+'</td></tr>'); |
|
parent.mapout.document.write( |
|
'<tr><td>URL:</td><td>'+data1[1]+'</td></tr>' |
|
+'<tr><td colspan=2><table><tr>'); |
|
for (j=2;j<data2.length;j++) { |
|
data4=data2[j].split(':'); |
|
data3=objlinks[data4[2]].split(':'); |
|
if (data3.length>1) { |
|
if (data3[1]==nr) { |
|
cck='#AAAAAA'; |
|
if (data3[2]!=0) { |
|
cck=condcolor((objcont[data3[2]].split(':'))[1]); |
|
condid=data3[2]; |
|
} else { |
|
condid='-'; |
|
} |
|
parent.mapout.document.writeln( |
|
'<td bgcolor='+cck+'>Next<br>'); |
|
parent.mapout.document.writeln('</td>'); |
|
} |
|
} |
|
} |
|
for (j=2;j<data2.length;j++) { |
|
data4=data2[j].split(':'); |
|
data3=objlinks[data4[2]].split(':'); |
|
if (data3.length>1) { |
|
if ((data3[1]!=nr) && (data3[1]!=0)) { |
|
cck='#AAAAAA'; |
|
if (data3[2]!=0) { |
|
cck=condcolor((objcont[data3[2]].split(':'))[1]); |
|
condid=data3[2]; |
|
} else { |
|
condid='-'; |
|
} |
|
parent.mapout.document.writeln( |
|
'<td bgcolor='+cck+'>To: '+robjs[data3[1]]+'<br>'); |
|
parent.mapout.document.writeln('</td>'); |
|
} |
|
} |
|
} |
|
parent.mapout.document.writeln('</tr></table></td></tr></table></tr>'); |
|
} |
|
} else { |
|
parent.mapout.document.writeln('<tr><td>No Resources</td></tr>'); |
|
} |
|
} |
|
|
// ---------------------------------- Sort objects to straighten graph or table |
// ---------------------------------- Sort objects to straighten graph or table |
|
|
function sortobjs() { |
function sortobjs() { |
Line 1805 function condense() {
|
Line 2027 function condense() {
|
// ---------------------------------------------------- Load from hidden fields |
// ---------------------------------------------------- Load from hidden fields |
|
|
function load() { |
function load() { |
|
message("Loading"); |
|
var k; |
|
for (k=0;k<objcont.length;k++) { objcont[k]=''; } |
objcont.length=0; |
objcont.length=0; |
|
for (k=0;k<objlinks.length;k++) { objlinks[k]=''; } |
objlinks.length=0; |
objlinks.length=0; |
objlinks[0]=''; |
objlinks[0]=''; |
objcont[0]=''; |
objcont[0]=''; |
Line 1829 function load() {
|
Line 2055 function load() {
|
if (data2[0]=='row') { row[data2[1]]=1*data2[2]; } |
if (data2[0]=='row') { row[data2[1]]=1*data2[2]; } |
if (data2[0]=='col') { col[data2[1]]=1*data2[2]; } |
if (data2[0]=='col') { col[data2[1]]=1*data2[2]; } |
if (data2[0]=='tablemode') { tablemode=1*data2[1]; } |
if (data2[0]=='tablemode') { tablemode=1*data2[1]; } |
|
if (data2[0]=='zscale') { zscale=1*data2[1]; } |
} |
} |
} |
} |
} |
} |
Line 1885 function storechange() {
|
Line 2112 function storechange() {
|
// ---------------------------------------------------------------- Toggle Mode |
// ---------------------------------------------------------------- Toggle Mode |
|
|
function togglemode() { |
function togglemode() { |
if (tablemode==0) { tablemode=1; } else { tablemode=0; } |
if (tablemode==0) { |
|
tablemode=1; |
|
} else { |
|
if (tablemode==1) { |
|
tablemode=2; |
|
} else { |
|
tablemode=0; |
|
} |
|
} |
|
notclear=0; |
|
infoclear(); |
draw(); |
draw(); |
} |
} |
|
|
Line 1917 function leave() {
|
Line 2154 function leave() {
|
|
|
<body bgcolor="#FFFFFF" onLoad="main();" onUnload="leave();"> |
<body bgcolor="#FFFFFF" onLoad="main();" onUnload="leave();"> |
<a href="javascript:togglemode();">Toggle Display Mode</a> |
<a href="javascript:togglemode();">Toggle Display Mode</a> |
|
<a href="javascript:if (zscale>1) { zscale--; draw();}">Zoom Out</a> |
|
<a href="javascript:if (zscale<3) { zscale++; draw();}">Zoom In</a> |
<a href="javascript:condense();draw();">Condense</a> |
<a href="javascript:condense();draw();">Condense</a> |
<a href="javascript:graphopt();draw();">Straighten</a> |
<a href="javascript:graphopt();draw();">Straighten</a> |
<a href="javascript:revert();">Revert</a> |
<a href="javascript:revert();">Revert</a> |