');
+ url=data1[1];
+ ext=data1[2];
+ urlparts=url.split('.');
+ mime=urlparts[urlparts.length-1];
+ if (typeof(mime)=="undefined") { mime=''; }
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ (' '+
+ ' ');
+ }
+ parent.mapout.document.write(
+ ''+k+' | ');
+ insrestab(rrow[data2[1]],i,nr,data1[3]);
+
}
- objsorted=objsort.sort(rescompare);
- for (ij=0;ij'+
+ '');
+}
+// ---------------------------------------- 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 mime;
+ var ext;
+ var url;
+ var urlparts=new Array;
+ var condid;
+ var sortstr=sortobjs();
+ if ((sortstr!='') && (typeof(sortstr)!="undefined")) {
+ objsorted=sortstr.split('&');
+ for (k=0;k');
+ url=data1[1];
+ ext=data1[2];
+ urlparts=url.split('.');
+ mime=urlparts[urlparts.length-1];
+ if (typeof(mime)=="undefined") { mime=''; }
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ (' '+
+ ' ');
+ }
+ parent.mapout.document.write(''+k+' | ');
+ data2=obj[i].split('&');
+ parent.mapout.document.write('');
+
+ if (data1[3]=='start') {
+ parent.mapout.document.writeln('Start | ');
+ }
+ if (data1[3]=='finish') {
+ parent.mapout.document.writeln('Finish | ');
+ }
+ parent.mapout.document.write(
+ 'Title: | '+data1[0]+' | ');
+ parent.mapout.document.write(
+ 'URL: | '+data1[1]+' | '
+ +'');
+ for (j=2;j1) {
+ 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(
+ 'Next ');
+ parent.mapout.document.writeln(' | ');
+ }
+ }
+ }
+ for (j=2;j1) {
+ 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(
+ 'To: '+robjs[data3[1]]+' ');
+ parent.mapout.document.writeln(' | ');
+ }
+ }
+ }
+ parent.mapout.document.writeln('
| ');
}
- alert("Table mode not yet implemented");
+ } else {
+ parent.mapout.document.writeln(' | No Resources | ');
+ }
}
-// ------------------------------------------- Sort objects to straighten graph
+// ---------------------------------- Sort objects to straighten graph or table
-function graphopt() {
+function sortobjs() {
+ message("Sorting Resources: "+funny);
var k;
var ij;
+ var dol;
+ var dtl;
var kj;
+ var sortthis=0;
var objsort=new Array();
- var objsorted=new Array();
- condense();
- graphreset();
for (k=1;kallcolmax) { allcolmax=thiscolmax; }
thiscolmax=1;
}
kj=rowcont.length-1;
- obj[thisnewobj]='b&'+kj+'&'+thiscolmax+':0:0:0';
+ obj[thisnewobj]='b&'+kj+'&'+thiscolmax+':0:0:0';
+ if (thiscolmax>allcolmax) { allcolmax=thiscolmax; }
}
for (k=0;k');
var k;
for (k=0;k');
+ data2=data1[k].split(':').join(':').split('<:>');
if (data2[0]=='graphdef') { graphdef=data2[1]; }
if (data2[0]=='maxcol') { maxcol=1*data2[1]; }
if (data2[0]=='maxrow') { maxrow=1*data2[1]; }
if (data2[0]=='obj') { obj[data2[1]]=data2[2]; }
if (data2[0]=='objcont') { objcont[data2[1]]=data2[2]; }
if (data2[0]=='objlinks') { objlinks[data2[1]]=data2[2]; }
+ if (data2[0]=='objparms') {
+ if (typeof(objparms[data2[1]])=="undefined") {
+ objparms[data2[1]]=data2[2];
+ } else {
+ objparms[data2[1]]+=':'+data2[2];
+ }
+ }
if (data2[0]=='rowcont') { rowcont[data2[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]=='mode') { mode=data2[1]; }
+ if (data2[0]=='tablemode') { tablemode=1*data2[1]; }
+ if (data2[0]=='zscale') { zscale=1*data2[1]; }
}
+ }
+ if (graphdef=='yes') {
+ for (k=1;k<=maxrow;k++) {
+ if (typeof(rowcont[k])=="undefined") { rowcont[k]=''; }
+ }
+ }
+}
+
+// -------------------------------------------------------------- Parameter set
+
+function setparms(resid) {
+ var options="scrollbars=1,resizable=1,menubar=0";
+ parmflag=1;
+ data1=objcont[resid].split(':');
+ parm=open("/adm/ratparms?url="+data1[1]+"&parms="+objparms[resid]+
+ "&resid="+resid,"parmout",options);
+ parm.focus();
}
// -------------------------------------------------------------- Undo function
@@ -1605,7 +2579,7 @@ function undo() {
undopointer--;
parent.server.document.forms.storage.output.value
=undostack[undopointer];
- load();
+ finishload();
undopointer--;
draw();
stored=0;
@@ -1621,7 +2595,7 @@ function redo() {
undopointer++;
parent.server.document.forms.storage.output.value
=undostack[undopointer];
- load();
+ finishload();
undopointer--;
draw();
stored=0;
@@ -1639,18 +2613,108 @@ 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.flag==1) {
+ 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);
+ checkdef();
+ wait();
+}
+
+// ----------------------------------------------------- launch indexer browser
+
+function groupsearch() {
+ alert('not yet implemented');
+}
+
+function groupimport() {
+ idxcheck('groupimport');
+}
+
// -------------------------------------------------------------- Store changes
function storechange() {
+ var k;
+ parent.flag=0;
parent.server.document.forms.storage.submit();
+ schedule('save');
+}
+
+function finishsave() {
+ finishload();
+ draw();
stored=1;
- alert("Stored changes");
+}
+
+// --------------------------------------- Gets called when submission finished
+
+function srvloaded() {
+ finishdone=1;
+ message("Server replied.");
}
// ---------------------------------------------------------------- Toggle Mode
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();
}
@@ -1659,39 +2723,50 @@ function togglemode() {
function main() {
if (mainrun==0) {
+ infopen();
+ infoclear();
load();
- draw();
stored=1;
mainrun=1;
}
}
-// ------------------------------------------------------------- Save on leave?
+// ---------------------------------------------------------- Close the window?
function leave() {
- if (stored==0) {
- if (confirm('Store changes?')) {
- storechange();
- }
+ if (!inf.closed) {
+ inf.close();
+ }
+ if (srch && !srch.closed) {
+ srchclose();
+ }
+ if (idx && !idx.closed) {
+ srchclose();
}
}
-
-Toggle Display Mode
-Condense
-Straighten
-Revert
-Undo
-Redo
-Store
+
+
+
-
-
-
-
-
| |