version 1.1, 2000/02/22 21:14:59
|
version 1.2, 2000/05/04 21:05:28
|
Line 6 Resource Assembly Tool
|
Line 6 Resource Assembly Tool
|
7/23,7/24,7/26, |
7/23,7/24,7/26, |
8/11,8/14,8/18,8/19,8/20,8/21,8/22,8/25,8/26,8/28,8/30,8/31, |
8/11,8/14,8/18,8/19,8/20,8/21,8/22,8/25,8/26,8/28,8/30,8/31, |
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/7,1/8,1/10,1/14,1/15,1/16,1/21,1/22,1/29,1/30,1/31, |
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, |
5/2,5/3,5/4 Gerd Kortemeyer with Scott Harrison |
2/19,2/20,2/21,2/22 Gerd Kortemeyer with Scott Harrison |
|
--> |
--> |
|
|
|
|
Line 37 var rrow=new Array();
|
Line 36 var rrow=new Array();
|
var cw=new Array(); |
var cw=new Array(); |
var rh=new Array(); |
var rh=new Array(); |
|
|
|
var undostack=new Array(); |
|
var undopointer=0; |
|
var stored=0; |
var editmode=0; |
var editmode=0; |
var notclear=0; |
var notclear=0; |
var linkmode=0; |
var linkmode=0; |
var lastinfo=''; |
var lastinfo=''; |
var graphdef='no'; |
var graphdef='no'; |
var mainrun=0; |
var mainrun=0; |
|
var tablemode=0; |
|
|
var data1=new Array(1024); |
var data1=new Array(1024); |
var data2=new Array(1024); |
var data2=new Array(1024); |
Line 55 var data5=new Array(1024);
|
Line 58 var data5=new Array(1024);
|
|
|
function insertrow(j,ex1,ex2) { |
function insertrow(j,ex1,ex2) { |
var kj; |
var kj; |
|
stored=0; |
objects1=''; |
objects1=''; |
objects2=''; |
objects2=''; |
for (kj=0;kj<=maxrow;kj++) { |
for (kj=0;kj<=maxrow;kj++) { |
Line 158 function insertrow(j,ex1,ex2) {
|
Line 162 function insertrow(j,ex1,ex2) {
|
|
|
function newcondition(content,type) { |
function newcondition(content,type) { |
var ko; |
var ko; |
|
stored=0; |
ko=obj.length; |
ko=obj.length; |
obj[ko]='c'; |
obj[ko]='c'; |
objcont[ko]=content+':'+type+':cond'; |
objcont[ko]=content+':'+type+':cond'; |
Line 167 function newcondition(content,type) {
|
Line 172 function newcondition(content,type) {
|
// ---------------------------------------------- Creates a new resource object |
// ---------------------------------------------- Creates a new resource object |
|
|
function newresource(rid,cid,text,url) { |
function newresource(rid,cid,text,url) { |
|
stored=0; |
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]=text+':'+url+':res'; |
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]=text+':'+url+':res'; |
} |
} |
|
|
Line 175 function newresource(rid,cid,text,url) {
|
Line 181 function newresource(rid,cid,text,url) {
|
|
|
function insertcond(obj1,portnr,cond) { |
function insertcond(obj1,portnr,cond) { |
var k; |
var k; |
|
stored=0; |
data1=obj[obj1].split('&'); |
data1=obj[obj1].split('&'); |
for (k=2;k<data1.length;k++) { |
for (k=2;k<data1.length;k++) { |
data2=data1[k].split(':'); |
data2=data1[k].split(':'); |
Line 191 function insertcond(obj1,portnr,cond) {
|
Line 198 function insertcond(obj1,portnr,cond) {
|
|
|
function insertcol(j) { |
function insertcol(j) { |
var kj; |
var kj; |
|
stored=0; |
for (kj=0;kj<=maxcol;kj++) { |
for (kj=0;kj<=maxcol;kj++) { |
if ( col[kj]>j ) { col[kj]++; } |
if ( col[kj]>j ) { col[kj]++; } |
} |
} |
Line 320 function insertport (obj1,d,inout,linkob
|
Line 328 function insertport (obj1,d,inout,linkob
|
|
|
|
|
var k; var port; var revport; |
var k; var port; var revport; |
|
stored=0; |
data1=obj[obj1].split('&'); |
data1=obj[obj1].split('&'); |
middle=maprow(data1[1],obj1,0); |
middle=maprow(data1[1],obj1,0); |
if (inout==1) { |
if (inout==1) { |
Line 395 function insertport (obj1,d,inout,linkob
|
Line 404 function insertport (obj1,d,inout,linkob
|
// returns object number of generated object |
// returns object number of generated object |
|
|
function addobj(kjid,objs) { |
function addobj(kjid,objs) { |
|
stored=0; |
if (rowcont[kjid]!='') { rowcont[kjid]+=':'; } |
if (rowcont[kjid]!='') { rowcont[kjid]+=':'; } |
rowcont[kjid]+=obj.length; |
rowcont[kjid]+=obj.length; |
obj[obj.length]=objs; |
obj[obj.length]=objs; |
Line 443 function horizontal(hrid,hoffs,hfcol,htc
|
Line 453 function horizontal(hrid,hoffs,hfcol,htc
|
|
|
function delobj(obj1) { |
function delobj(obj1) { |
var k; |
var k; |
|
stored=0; |
for (k=0;k<rowcont.length;k++) { |
for (k=0;k<rowcont.length;k++) { |
data4=rowcont[k].split(':'); |
data4=rowcont[k].split(':'); |
rowcont[k]=''; |
rowcont[k]=''; |
Line 499 function cleanup () {
|
Line 510 function cleanup () {
|
|
|
function delcond(obj1,colid) { |
function delcond(obj1,colid) { |
var k; |
var k; |
|
stored=0; |
data3=obj[obj1].split('&'); |
data3=obj[obj1].split('&'); |
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++) { |
Line 536 function crecond(obj1,colid,condtext,con
|
Line 548 function crecond(obj1,colid,condtext,con
|
|
|
function dellink (linknr) { |
function dellink (linknr) { |
var k; var obj1; var obj2; |
var k; var obj1; var obj2; |
|
stored=0; |
if (objlinks[linknr]!='') { |
if (objlinks[linknr]!='') { |
data3=objlinks[linknr].split(':'); |
data3=objlinks[linknr].split(':'); |
obj1=data3[0]; |
obj1=data3[0]; |
Line 576 function dellink (linknr) {
|
Line 589 function dellink (linknr) {
|
|
|
function joinres (obj1,obj2,cond) { |
function joinres (obj1,obj2,cond) { |
var k; var kr; var outcol; var incol; var d; |
var k; var kr; var outcol; var incol; var d; |
|
stored=0; |
dest=objlinks.length; |
dest=objlinks.length; |
objlinks[dest]=obj1+':'+obj2+':'+cond; |
objlinks[dest]=obj1+':'+obj2+':'+cond; |
data3=obj[obj1].split('&'); |
data3=obj[obj1].split('&'); |
Line 694 function delres (obj1,recon) {
|
Line 708 function delres (obj1,recon) {
|
|
|
var k; var k1; var k2; var found; |
var k; var k1; var k2; var found; |
|
|
|
stored=0; |
|
|
data1=obj[obj1].split('&'); |
data1=obj[obj1].split('&'); |
for (k=2;k<data1.length;k++) { |
for (k=2;k<data1.length;k++) { |
data2=data1[k].split(':'); |
data2=data1[k].split(':'); |
Line 788 function delres (obj1,recon) {
|
Line 804 function delres (obj1,recon) {
|
|
|
// -------------------------------------------------------------- Draw an entry |
// -------------------------------------------------------------- Draw an entry |
|
|
function drawcell (rtype,ctype,what,cm,obj1,mode2,ej,ek,ne) { |
function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { |
var bgcolor; |
var bgcolor; |
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]+'>'); |
Line 833 function drawcell (rtype,ctype,what,cm,o
|
Line 849 function drawcell (rtype,ctype,what,cm,o
|
|
|
// ----------------------------------------------------------------- Draw a row |
// ----------------------------------------------------------------- Draw a row |
|
|
function drawrow (jid,mode2) { |
function drawrow (jid) { |
var j; var jk; var k; var rc; var gc; var bc; var ck; |
var j; var jk; var k; var rc; var gc; var bc; var ck; |
var objd1=new Array(); |
var objd1=new Array(); |
var objd2=new Array(); |
var objd2=new Array(); |
Line 1004 if (rowtype[jid]!=0) {
|
Line 1020 if (rowtype[jid]!=0) {
|
} |
} |
rtype=rowtype[jid]; |
rtype=rowtype[jid]; |
for (k=0;k<=maxcol;k++) { |
for (k=0;k<=maxcol;k++) { |
drawcell(rtype,coltype[rcol[k]],colmap[k],colmap5[k],objd1[k],mode2,jid,k, |
drawcell(rtype,coltype[rcol[k]],colmap[k],colmap5[k],objd1[k],jid,k, |
notempty[k]); |
notempty[k]); |
} |
} |
if (rowtype[jid]==2) { |
if (rowtype[jid]==2) { |
parent.mapout.document.writeln('</tr><tr>'); |
parent.mapout.document.writeln('</tr><tr>'); |
for (k=0;k<=maxcol;k++) { |
for (k=0;k<=maxcol;k++) { |
drawcell(1,coltype[rcol[k]],colmap2[k],colmap5[k],objd2[k],mode2,jid,k, |
drawcell(1,coltype[rcol[k]],colmap2[k],colmap5[k],objd2[k],jid,k,1); |
1); |
|
} |
} |
parent.mapout.document.writeln('</tr><tr>'); |
parent.mapout.document.writeln('</tr><tr>'); |
for (k=0;k<=maxcol;k++) { |
for (k=0;k<=maxcol;k++) { |
drawcell(1,coltype[rcol[k]],colmap3[k],colmap6[k],objd2[k],mode2,jid,k, |
drawcell(1,coltype[rcol[k]],colmap3[k],colmap6[k],objd2[k],jid,k,1); |
1); |
|
} |
} |
} |
} |
} |
} |
Line 1026 if (rowtype[jid]!=0) {
|
Line 1040 if (rowtype[jid]!=0) {
|
|
|
// ------------------------------------------------------------- Draw the table |
// ------------------------------------------------------------- Draw the table |
|
|
function draw (mode,mode2) { |
function draw () { |
var k; var kr; |
var k; var kr; |
|
|
|
|
cleanup(); |
cleanup(); |
|
save(); |
|
|
|
|
if (mode=='debug') { |
|
var options="scrollbars=1,resizable=1,menubar=0,width=500,height=300"; |
|
deb=open("","debout",options); |
|
deb.document.clear(); |
|
deb.document.writeln('<html><body bgcolor="#FFFFFF">'); |
|
|
|
for (k=0;k<obj.length;k++) { deb.document.writeln(k+' - '+obj[k]+'<br>'); } |
|
deb.document.writeln('<hr>Cols: '+col+'<hr>Rows: '+row+'<hr>'); |
|
deb.document.writeln(objcont+'<hr>'+objlinks+'<hr>'); |
|
for (kr=0;kr<=maxrow;kr++) { |
|
kid=findrow(kr); |
|
maprow(kid,-1,0); |
|
deb.document.writeln(kid+' : '+colmap+' '+rowcont[kid]+"<br>"); |
|
} |
|
deb.document.writeln('<hr>Rowtype: '+rowtype+'<hr>Coltype: '+coltype); |
|
deb.document.writeln('<hr>maxcol: '+maxcol+'<hr>maxrow: '+maxrow); |
|
deb.document.writeln('</body></html>'); |
|
deb.document.close(); |
|
} |
|
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; } |
rh[0]=0; |
rh[0]=0; |
Line 1065 for (k=0;k<obj.length;k++) { deb.documen
|
Line 1059 for (k=0;k<obj.length;k++) { deb.documen
|
parent.mapout.document.writeln( |
parent.mapout.document.writeln( |
'<table cellpadding=0 cellspacing=0 border=0>'); |
'<table cellpadding=0 cellspacing=0 border=0>'); |
|
|
for (kr=0;kr<=maxrow;kr++) { drawrow(rrow[kr],mode2); } |
if (tablemode==0) { |
|
for (kr=0;kr<=maxrow;kr++) { drawrow(rrow[kr]); } |
|
} else { |
|
tabledraw(); |
|
} |
|
|
parent.mapout.document.writeln('</table>'); |
parent.mapout.document.writeln('</table>'); |
parent.mapout.document.writeln('</body></html>'); |
parent.mapout.document.writeln('</body></html>'); |
Line 1179 function escape(instring) {
|
Line 1177 function escape(instring) {
|
return outstring; |
return outstring; |
} |
} |
|
|
|
// -------------------------------------------------- Insert resource into link |
|
|
|
function insertreslink(infostr) { |
|
alert(infostr); |
|
} |
|
|
// ---------------------------------------------------- Handles "click to edit" |
// ---------------------------------------------------- Handles "click to edit" |
|
|
function handler(infostr) { |
function handler(infostr) { |
Line 1227 function handler(infostr) {
|
Line 1231 function handler(infostr) {
|
} |
} |
inf.document.writeln( |
inf.document.writeln( |
'opener.infoclear();opener.editmode=0;opener.draw(' |
'opener.infoclear();opener.editmode=0;opener.draw(' |
+"'debug','edit'"+');">Change to above values</a> ' |
+');">Change to above values</a> ' |
+' <a href="javascript:self.document.forms.condinfo.reset()">Reset</a>' |
+' <a href="javascript:self.document.forms.condinfo.reset()">Reset</a>' |
+'<input type=hidden name=h value='+data2[1] |
+'<input type=hidden name=h value='+data2[1] |
+'></form>'); |
+'></form>'); |
Line 1235 function handler(infostr) {
|
Line 1239 function handler(infostr) {
|
inf.document.writeln( |
inf.document.writeln( |
'<a href="javascript:opener.notclear=0;opener.infoclear();' |
'<a href="javascript:opener.notclear=0;opener.infoclear();' |
+'opener.delcond('+data1[2]+','+data1[1]+');opener.editmode=0;opener.draw(' |
+'opener.delcond('+data1[2]+','+data1[1]+');opener.editmode=0;opener.draw(' |
+"'debug','edit'"+');">Delete Condition</a>'); |
+');">Delete Condition</a>'); |
} else { |
} else { |
if (data1[0]=='r') { |
if (data1[0]=='r') { |
if (linkmode!=0) { |
if (linkmode!=0) { |
Line 1244 function handler(infostr) {
|
Line 1248 function handler(infostr) {
|
notclear=0; |
notclear=0; |
linkmode=0; |
linkmode=0; |
inf.document.writeln('<b>Linked Resources</b>'); |
inf.document.writeln('<b>Linked Resources</b>'); |
draw('debug','edit'); |
draw(); |
} else { |
} else { |
inf.document.writeln('<b>Resource</b>'); |
inf.document.writeln('<b>Resource</b>'); |
data2=objcont[data1[1]].split(':'); |
data2=objcont[data1[1]].split(':'); |
Line 1268 function handler(infostr) {
|
Line 1272 function handler(infostr) {
|
inf.document.writeln( |
inf.document.writeln( |
'<a href="javascript:opener.notclear=0;opener.infoclear();' |
'<a href="javascript:opener.notclear=0;opener.infoclear();' |
+'opener.delres('+data1[1]+',0);opener.editmode=0;opener.draw(' |
+'opener.delres('+data1[1]+',0);opener.editmode=0;opener.draw(' |
+"'debug','edit'"+');">Delete Resource (cutting links)</a>'); |
+');">Delete Resource (cutting links)</a>'); |
inf.document.writeln( |
inf.document.writeln( |
'<br><a href="javascript:opener.notclear=0;opener.infoclear();' |
'<br><a href="javascript:opener.notclear=0;opener.infoclear();' |
+'opener.delres('+data1[1]+',1);opener.editmode=0;opener.draw(' |
+'opener.delres('+data1[1]+',1);opener.editmode=0;opener.draw(' |
+"'debug','edit'"+');">Delete Resource (preserving links)</a>'); |
+');">Delete Resource (preserving links)</a>'); |
inf.document.writeln( |
inf.document.writeln( |
'<br><a href="javascript:opener.editmode=0;opener.notclear=0;' |
'<br><a href="javascript:opener.editmode=0;opener.notclear=0;' |
+'opener.linkmode='+data1[1]+';' |
+'opener.linkmode='+data1[1]+';' |
Line 1288 function handler(infostr) {
|
Line 1292 function handler(infostr) {
|
'</b><br>to <b>'+objcont[data3[1]].split(':')[0]+'</b>'); |
'</b><br>to <b>'+objcont[data3[1]].split(':')[0]+'</b>'); |
inf.document.writeln('<br><a href="javascript:opener.dellink('+ |
inf.document.writeln('<br><a href="javascript:opener.dellink('+ |
k+');opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
k+');opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">Delete Link</a>'); |
+');">Delete Link</a>'); |
|
inf.document.writeln('<br><a href="javascript:'+ |
|
'opener.insertreslink('+infostr+');'+ |
|
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
|
+');">Insert Resource Into Link</a>'); |
} |
} |
} |
} |
inf.document.writeln( |
inf.document.writeln( |
Line 1320 function empty(rid,k) {
|
Line 1328 function empty(rid,k) {
|
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
rid+','+cid+",'','');"+ |
rid+','+cid+",'','');"+ |
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">Insert Resource</a>'); |
+');">Insert Resource</a>'); |
inf.document.writeln('<hr>Insert column:'); |
inf.document.writeln('<hr>Insert column:'); |
inf.document.writeln('<a href="javascript:opener.insertcol('+ |
inf.document.writeln('<a href="javascript:opener.insertcol('+ |
lcol+');opener.addobj('+rid+",'e&'+opener.maxcol);" |
lcol+');opener.addobj('+rid+",'e&'+opener.maxcol);" |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">left</a>'); |
+');">left</a>'); |
inf.document.writeln('<a href="javascript:opener.insertcol('+ |
inf.document.writeln('<a href="javascript:opener.insertcol('+ |
k+');opener.addobj('+rid+",'e&'+opener.maxcol);" |
k+');opener.addobj('+rid+",'e&'+opener.maxcol);" |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">right</a> '); |
+');">right</a> '); |
inf.document.writeln('<br>Insert row:'); |
inf.document.writeln('<br>Insert row:'); |
inf.document.writeln('<a href="javascript:opener.insertrow('+ |
inf.document.writeln('<a href="javascript:opener.insertrow('+ |
trow+');opener.addobj(opener.maxrow'+",'e&"+cid+"');" |
trow+');opener.addobj(opener.maxrow'+",'e&"+cid+"');" |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">below</a>'); |
+');">below</a>'); |
inf.document.writeln('<a href="javascript:opener.insertrow('+ |
inf.document.writeln('<a href="javascript:opener.insertrow('+ |
lrow+');opener.addobj(opener.maxrow'+",'e&"+cid+"');" |
lrow+');opener.addobj(opener.maxrow'+",'e&"+cid+"');" |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+"'debug','edit'"+');">above</a> '); |
+');">above</a> '); |
|
|
|
|
inf.document.writeln( |
inf.document.writeln( |
Line 1353 function empty(rid,k) {
|
Line 1361 function empty(rid,k) {
|
|
|
function save() { |
function save() { |
var k; |
var k; |
self.document.forms.storage.output.value='graphdef<:>yes'; |
parent.server.document.forms.storage.output.value='graphdef<:>yes'; |
for (k=0;k<obj.length;k++) { |
for (k=0;k<obj.length;k++) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>obj<:>'+k+'<:>'+obj[k]; |
'<&>obj<:>'+k+'<:>'+obj[k]; |
} |
} |
for (k=0;k<row.length;k++) { |
for (k=0;k<row.length;k++) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>row<:>'+k+'<:>'+row[k]; |
'<&>row<:>'+k+'<:>'+row[k]; |
} |
} |
for (k=0;k<col.length;k++) { |
for (k=0;k<col.length;k++) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>col<:>'+k+'<:>'+col[k]; |
'<&>col<:>'+k+'<:>'+col[k]; |
} |
} |
for (k=0;k<rowcont.length;k++) { |
for (k=0;k<rowcont.length;k++) { |
if (rowcont[k]) { |
if (rowcont[k]) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>rowcont<:>'+k+'<:>'+rowcont[k]; |
'<&>rowcont<:>'+k+'<:>'+rowcont[k]; |
} |
} |
} |
} |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>maxcol<:>'+maxcol; |
'<&>maxcol<:>'+maxcol; |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>maxrow<:>'+maxrow; |
'<&>maxrow<:>'+maxrow; |
|
|
for (k=0;k<objcont.length;k++) { |
for (k=0;k<objcont.length;k++) { |
if (objcont[k]) { |
if (objcont[k]) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>objcont<:>'+k+'<:>'+objcont[k]; |
'<&>objcont<:>'+k+'<:>'+objcont[k]; |
} |
} |
} |
} |
for (k=0;k<objlinks.length;k++) { |
for (k=0;k<objlinks.length;k++) { |
if (objlinks[k]) { |
if (objlinks[k]) { |
self.document.forms.storage.output.value+= |
parent.server.document.forms.storage.output.value+= |
'<&>objlinks<:>'+k+'<:>'+objlinks[k]; |
'<&>objlinks<:>'+k+'<:>'+objlinks[k]; |
} |
} |
} |
} |
|
undopointer++; |
|
undostack[undopointer]= |
|
parent.server.document.forms.storage.output.value; |
} |
} |
|
|
// ----------------------------------------------- Reset all layout information |
// ----------------------------------------------- Reset all layout information |
Line 1435 function rescompare(a,b) {
|
Line 1446 function rescompare(a,b) {
|
return rvalue; |
return rvalue; |
} |
} |
|
|
|
// -------------------------------------------- Draw the table instead of graph |
|
|
|
function tabledraw() { |
|
var k; |
|
var ij; |
|
var kj; |
|
var objsort=new Array(); |
|
var objsorted=new Array(); |
|
for (k=1;k<objcont.length;k++) { |
|
if (objcont[k]) { |
|
data1=objcont[k].split(':'); |
|
if (data1[data1.length-1]=='res') { |
|
objsort[objsort.length]=''+k; |
|
} |
|
} |
|
} |
|
for (k=1;k<objlinks.length;k++) { |
|
data1=objlinks[k].split(':'); |
|
kj=-1; |
|
for (j=0;j<objsort.length;j++) { |
|
if ((objsort[j].split(':'))[0]==data1[0]) { |
|
kj=j; |
|
} |
|
} |
|
objsort[kj]+=':'+data1[1]; |
|
} |
|
objsorted=objsort.sort(rescompare); |
|
for (ij=0;ij<objsorted.length;ij++) { |
|
|
|
} |
|
alert("Table mode not yet implemented"); |
|
} |
|
|
// ------------------------------------------- Sort objects to straighten graph |
// ------------------------------------------- Sort objects to straighten graph |
|
|
function graphopt() { |
function graphopt() { |
Line 1537 function load() {
|
Line 1581 function load() {
|
notclear=0; |
notclear=0; |
lastinfo=''; |
lastinfo=''; |
graphreset(); |
graphreset(); |
var inputstr=self.document.forms.storage.output.value; |
var inputstr=parent.server.document.forms.storage.output.value; |
data1=inputstr.split('<&>'); |
data1=inputstr.split('<&>'); |
var k; |
var k; |
for (k=0;k<data1.length;k++) { |
for (k=0;k<data1.length;k++) { |
Line 1554 function load() {
|
Line 1598 function load() {
|
} |
} |
} |
} |
|
|
|
// -------------------------------------------------------------- Undo function |
|
|
|
function undo() { |
|
if (undopointer>1) { |
|
undopointer--; |
|
parent.server.document.forms.storage.output.value |
|
=undostack[undopointer]; |
|
load(); |
|
undopointer--; |
|
draw(); |
|
stored=0; |
|
} else { |
|
alert("Cannot undo: reached beginning of edit session"); |
|
} |
|
} |
|
|
|
// -------------------------------------------------------------- Redo function |
|
|
|
function redo() { |
|
if (undopointer<undostack.length-1) { |
|
undopointer++; |
|
parent.server.document.forms.storage.output.value |
|
=undostack[undopointer]; |
|
load(); |
|
undopointer--; |
|
draw(); |
|
stored=0; |
|
} else { |
|
alert("Cannot redo: reached end of edit session"); |
|
} |
|
} |
|
|
|
// ------------------------------------------------------------ Revert function |
|
|
|
function revert() { |
|
if (confirm("Revert to beginning of edit session?")) { |
|
undopointer=2; |
|
undo(); |
|
} |
|
} |
|
|
|
// -------------------------------------------------------------- Store changes |
|
|
|
function storechange() { |
|
parent.server.document.forms.storage.submit(); |
|
stored=1; |
|
alert("Stored changes"); |
|
} |
|
|
|
// ---------------------------------------------------------------- Toggle Mode |
|
|
|
function togglemode() { |
|
if (tablemode==0) { tablemode=1; } else { tablemode=0; } |
|
draw(); |
|
} |
|
|
// -------------------------------------------------------- Main program onLoad |
// -------------------------------------------------------- Main program onLoad |
|
|
function main() { |
function main() { |
|
|
if (mainrun==0) { |
if (mainrun==0) { |
load(); |
load(); |
draw('debug','edit'); |
draw(); |
|
stored=1; |
mainrun=1; |
mainrun=1; |
} |
} |
|
|
} |
} |
|
|
|
// ------------------------------------------------------------- Save on leave? |
|
|
|
function leave() { |
|
if (stored==0) { |
|
if (confirm('Store changes?')) { |
|
storechange(); |
|
} |
|
} |
|
} |
|
|
</script> |
</script> |
</head> |
</head> |
|
|
<body bgcolor="#FFFFFF" onLoad="main();"> |
<body bgcolor="#FFFFFF" onLoad="main();" onUnload="leave();"> |
<a href="javascript:condense();draw('debug','edit');">Condense</a> |
<a href="javascript:togglemode();">Toggle Display Mode</a> |
<a href="javascript:graphopt();draw('debug','edit');">Straighten</a> |
<a href="javascript:condense();draw();">Condense</a> |
<form name=storage method=post> |
<a href="javascript:graphopt();draw();">Straighten</a> |
<input type=hidden name=output> |
<a href="javascript:revert();">Revert</a> |
</form> |
<a href="javascript:undo();">Undo</a> |
|
<a href="javascript:redo();">Redo</a> |
|
<a href="javascript:storechange();">Store</a> |
</body> |
</body> |
</html> |
|
|
|
|
</html> |
|
|
|
|
|
|
|
|
|
|