--- rat/client/Attic/code.html 2000/02/22 21:14:59 1.1
+++ rat/client/Attic/code.html 2000/05/04 21:05:28 1.2
@@ -6,10 +6,9 @@ Resource Assembly Tool
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,
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,
-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 Gerd Kortemeyer with Scott Harrison
+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,
+5/2,5/3,5/4 Gerd Kortemeyer with Scott Harrison
-->
@@ -37,12 +36,16 @@ var rrow=new Array();
var cw=new Array();
var rh=new Array();
+var undostack=new Array();
+var undopointer=0;
+var stored=0;
var editmode=0;
var notclear=0;
var linkmode=0;
var lastinfo='';
var graphdef='no';
var mainrun=0;
+var tablemode=0;
var data1=new Array(1024);
var data2=new Array(1024);
@@ -55,6 +58,7 @@ var data5=new Array(1024);
function insertrow(j,ex1,ex2) {
var kj;
+ stored=0;
objects1='';
objects2='';
for (kj=0;kj<=maxrow;kj++) {
@@ -158,6 +162,7 @@ function insertrow(j,ex1,ex2) {
function newcondition(content,type) {
var ko;
+ stored=0;
ko=obj.length;
obj[ko]='c';
objcont[ko]=content+':'+type+':cond';
@@ -167,6 +172,7 @@ function newcondition(content,type) {
// ---------------------------------------------- Creates a new resource object
function newresource(rid,cid,text,url) {
+ stored=0;
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]=text+':'+url+':res';
}
@@ -175,6 +181,7 @@ function newresource(rid,cid,text,url) {
function insertcond(obj1,portnr,cond) {
var k;
+ stored=0;
data1=obj[obj1].split('&');
for (k=2;kj ) { col[kj]++; }
}
@@ -320,6 +328,7 @@ function insertport (obj1,d,inout,linkob
var k; var port; var revport;
+ stored=0;
data1=obj[obj1].split('&');
middle=maprow(data1[1],obj1,0);
if (inout==1) {
@@ -395,6 +404,7 @@ function insertport (obj1,d,inout,linkob
// returns object number of generated object
function addobj(kjid,objs) {
+ stored=0;
if (rowcont[kjid]!='') { rowcont[kjid]+=':'; }
rowcont[kjid]+=obj.length;
obj[obj.length]=objs;
@@ -443,6 +453,7 @@ function horizontal(hrid,hoffs,hfcol,htc
function delobj(obj1) {
var k;
+ stored=0;
for (k=0;k');
@@ -833,7 +849,7 @@ function drawcell (rtype,ctype,what,cm,o
// ----------------------------------------------------------------- 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 objd1=new Array();
var objd2=new Array();
@@ -1004,19 +1020,17 @@ if (rowtype[jid]!=0) {
}
rtype=rowtype[jid];
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]);
}
if (rowtype[jid]==2) {
parent.mapout.document.writeln('');
for (k=0;k<=maxcol;k++) {
- drawcell(1,coltype[rcol[k]],colmap2[k],colmap5[k],objd2[k],mode2,jid,k,
- 1);
+ drawcell(1,coltype[rcol[k]],colmap2[k],colmap5[k],objd2[k],jid,k,1);
}
parent.mapout.document.writeln('
');
for (k=0;k<=maxcol;k++) {
- drawcell(1,coltype[rcol[k]],colmap3[k],colmap6[k],objd2[k],mode2,jid,k,
- 1);
+ drawcell(1,coltype[rcol[k]],colmap3[k],colmap6[k],objd2[k],jid,k,1);
}
}
}
@@ -1026,32 +1040,12 @@ if (rowtype[jid]!=0) {
// ------------------------------------------------------------- Draw the table
-function draw (mode,mode2) {
+function draw () {
var k; var kr;
-
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('');
-
-for (k=0;k'); }
- deb.document.writeln('
Cols: '+col+'
Rows: '+row+'
');
- deb.document.writeln(objcont+'
'+objlinks+'
');
- for (kr=0;kr<=maxrow;kr++) {
- kid=findrow(kr);
- maprow(kid,-1,0);
- deb.document.writeln(kid+' : '+colmap+' '+rowcont[kid]+"
");
- }
- deb.document.writeln('
Rowtype: '+rowtype+'
Coltype: '+coltype);
- deb.document.writeln('
maxcol: '+maxcol+'
maxrow: '+maxrow);
- deb.document.writeln('');
- deb.document.close();
- }
for (k=0;k<=maxrow;k++) { rrow[row[k]]=k; }
for (k=0;k<=maxcol;k++) { rcol[col[k]]=k; }
rh[0]=0;
@@ -1065,7 +1059,11 @@ for (k=0;k');
- 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('');
parent.mapout.document.writeln('