version 1.6, 2000/07/04 16:25:22
|
version 1.9, 2000/07/31 15:36:22
|
Line 9 Resource Assembly Tool
|
Line 9 Resource Assembly Tool
|
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/25, |
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,6/9,6/10,6/12,6/15,7/4 |
6/7,6/8,6/9,6/10,6/12,6/15,7/4,7/26,7/28,7/31 |
Gerd Kortemeyer with Scott Harrison |
Gerd Kortemeyer with Scott Harrison |
--> |
--> |
|
|
Line 56 var zscale=3;
|
Line 56 var zscale=3;
|
var disrows=0; |
var disrows=0; |
var discols=0; |
var discols=0; |
|
|
|
var finishdone=0; |
|
var tim=0; |
|
var funny='|'; |
|
var reqaction=''; |
|
var canceltim; |
|
|
var data1=new Array(1024); |
var data1=new Array(1024); |
var data2=new Array(1024); |
var data2=new Array(1024); |
var data3=new Array(1024); |
var data3=new Array(1024); |
Line 1153 function draw () {
|
Line 1159 function draw () {
|
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]); |
} |
} |
Line 1689 function graphreset() {
|
Line 1695 function graphreset() {
|
insertcol(-1); |
insertcol(-1); |
|
|
objcont[0]=''; |
objcont[0]=''; |
objcont[1]='Start::false:start:res' |
if (((objcont[1]==undefined)&&(objcont[2]==undefined)) || |
objcont[2]='Finish::false:finish:res'; |
((objcont[1]=='')&&(objcont[2]==''))) { |
objlinks[0]=''; |
objcont[1]='Start::false:start:res' |
objlinks[1]='1:2:0'; |
objcont[2]='Finish::false:finish:res'; |
|
objlinks[0]=''; |
|
objlinks[1]='1:2:0'; |
|
} |
|
|
graphdef='no'; |
graphdef='no'; |
|
|
Line 2003 function simpletabledraw() {
|
Line 2012 function simpletabledraw() {
|
// ---------------------------------- Sort objects to straighten graph or table |
// ---------------------------------- Sort objects to straighten graph or table |
|
|
function sortobjs() { |
function sortobjs() { |
message("Sorting Resources"); |
message("Sorting Resources: "+funny); |
var k; |
var k; |
var ij; |
var ij; |
var dol; |
var dol; |
Line 2021 function sortobjs() {
|
Line 2030 function sortobjs() {
|
} |
} |
if (objsort.length==0) { return ''; } |
if (objsort.length==0) { return ''; } |
for (k=1;k<objlinks.length;k++) { |
for (k=1;k<objlinks.length;k++) { |
|
wheelswitch(); |
|
message("Sorting Resources: "+funny); |
if (objlinks[k]!='') { |
if (objlinks[k]!='') { |
sortthis=1; |
sortthis=1; |
data1=objlinks[k].split(':'); |
data1=objlinks[k].split(':'); |
Line 2030 function sortobjs() {
|
Line 2041 function sortobjs() {
|
kj=j; |
kj=j; |
} |
} |
} |
} |
objsort[kj]+=':'+data1[1]; |
if (kj!=-1) { objsort[kj]+=':'+data1[1]; } |
} |
} |
} |
} |
if (sortthis!=0) { |
if (sortthis!=0) { |
for (k=0;k<objsort.length;k++) { |
for (k=0;k<objsort.length;k++) { |
|
wheelswitch(); |
|
message("Sorting Resources: "+funny); |
for (j=0;j<objsort.length;j++) { |
for (j=0;j<objsort.length;j++) { |
if (k!=j) { |
if (k!=j) { |
data1=objsort[k].split(':'); |
data1=objsort[k].split(':'); |
data2=objsort[j].split(':'); |
data2=objsort[j].split(':'); |
dol=data1.length; |
dol=data1.length; |
dtl=data2.length; |
dtl=data2.length; |
for (kj=1;kj<dol;kj++) { |
if (dol+dtl<200) { |
|
for (kj=1;kj<dol;kj++) { |
if (data1[kj]==data2[0]) { |
if (data1[kj]==data2[0]) { |
for (ij=1;ij<dtl;ij++) { |
for (ij=1;ij<dtl;ij++) { |
data1[data1.length]=data2[ij]; |
data1[data1.length]=data2[ij]; |
} |
} |
} |
} |
} |
} |
for (kj=1;kj<dtl;kj++) { |
for (kj=1;kj<dtl;kj++) { |
if (data2[kj]==data1[0]) { |
if (data2[kj]==data1[0]) { |
for (ij=1;ij<dol;ij++) { |
for (ij=1;ij<dol;ij++) { |
data2[data2.length]=data1[ij]; |
data2[data2.length]=data1[ij]; |
} |
} |
} |
} |
|
} |
|
objsort[k]=data1.join(':'); |
|
objsort[j]=data2.join(':'); |
} |
} |
objsort[k]=data1.join(':'); |
|
objsort[j]=data2.join(':'); |
|
} |
} |
} |
} |
} |
} |
|
message("Sorting Resources: finishing up."); |
return objsort.sort(rescompare).join('&'); |
return objsort.sort(rescompare).join('&'); |
} else { |
} else { |
return objsort.join('&'); |
return objsort.join('&'); |
Line 2147 function condense() {
|
Line 2163 function condense() {
|
|
|
function load() { |
function load() { |
message("Loading"); |
message("Loading"); |
|
schedule('load'); |
|
checkdef(); |
|
} |
|
|
|
function finishload() { |
var k; |
var k; |
for (k=0;k<objcont.length;k++) { objcont[k]=''; } |
for (k=0;k<objcont.length;k++) { objcont[k]=''; } |
objcont.length=0; |
objcont.length=0; |
Line 2178 function load() {
|
Line 2199 function load() {
|
if (data2[0]=='zscale') { zscale=1*data2[1]; } |
if (data2[0]=='zscale') { zscale=1*data2[1]; } |
} |
} |
} |
} |
|
if (graphdef=='yes') { |
|
for (k=1;k<=maxrow;k++) { |
|
if (rowcont[k]==undefined) { rowcont[k]=''; } |
|
} |
|
} |
} |
} |
|
|
// -------------------------------------------------------------- Undo function |
// -------------------------------------------------------------- Undo function |
Line 2187 function undo() {
|
Line 2213 function undo() {
|
undopointer--; |
undopointer--; |
parent.server.document.forms.storage.output.value |
parent.server.document.forms.storage.output.value |
=undostack[undopointer]; |
=undostack[undopointer]; |
load(); |
finishload(); |
undopointer--; |
undopointer--; |
draw(); |
draw(); |
stored=0; |
stored=0; |
Line 2203 function redo() {
|
Line 2229 function redo() {
|
undopointer++; |
undopointer++; |
parent.server.document.forms.storage.output.value |
parent.server.document.forms.storage.output.value |
=undostack[undopointer]; |
=undostack[undopointer]; |
load(); |
finishload(); |
undopointer--; |
undopointer--; |
draw(); |
draw(); |
stored=0; |
stored=0; |
Line 2221 function revert() {
|
Line 2247 function revert() {
|
} |
} |
} |
} |
|
|
|
// ---------------------------------------------------------------- Wheelswitch |
|
|
|
function wheelswitch() { |
|
if (funny=='|') { |
|
funny='/'; |
|
} else { |
|
if (funny=='/') { |
|
funny='-'; |
|
} else { |
|
if (funny=='-') { |
|
funny='\\'; |
|
} else { |
|
if (funny=='\\') { funny='|'; } |
|
} |
|
} |
|
} |
|
} |
|
|
|
// --------------------------------------------- Checks if server frame defined |
|
|
|
function checkdef() { |
|
if (parent.server.document.forms.storage.output.value!=undefined) { |
|
srvloaded(); |
|
} |
|
if ((finishdone==0) && (tim==0)) { setTimeout('checkdef()',100); } |
|
} |
|
|
|
// ---------------------------------------------------------- The wait function |
|
|
|
function wait() { |
|
if ((finishdone==1) || (tim==1)) { |
|
if (tim==0) { |
|
clearTimeout(canceltim); |
|
if (reqaction=='save') { finishsave(); } |
|
if (reqaction=='load') { finishload(); draw(); } |
|
} else { |
|
alert("Server Communication Timed Out."); |
|
} |
|
} else { |
|
wheelswitch(); |
|
message('Waiting for server reply: '+funny); |
|
setTimeout('wait();',100); |
|
} |
|
} |
|
|
|
// ---------------------------------------------------------- Schedule function |
|
|
|
function schedule(action) { |
|
reqaction=action; |
|
tim=0; |
|
finishdone=0; |
|
canceltim=setTimeout('tim=1;',20000) |
|
wait(); |
|
} |
|
|
// -------------------------------------------------------------- Store changes |
// -------------------------------------------------------------- Store changes |
|
|
function storechange() { |
function storechange() { |
|
var k; |
parent.server.document.forms.storage.submit(); |
parent.server.document.forms.storage.submit(); |
|
schedule('save'); |
|
} |
|
|
|
function finishsave() { |
|
finishload(); |
|
draw(); |
stored=1; |
stored=1; |
} |
} |
|
|
|
// --------------------------------------- Gets called when submission finished |
|
|
|
function srvloaded() { |
|
finishdone=1; |
|
message("Server replied."); |
|
} |
|
|
// ---------------------------------------------------------------- Toggle Mode |
// ---------------------------------------------------------------- Toggle Mode |
|
|
function togglemode() { |
function togglemode() { |
Line 2253 function main() {
|
Line 2348 function main() {
|
infopen(); |
infopen(); |
infoclear(); |
infoclear(); |
load(); |
load(); |
draw(); |
|
stored=1; |
stored=1; |
mainrun=1; |
mainrun=1; |
} |
} |