version 1.48, 2001/11/29 19:15:37
|
version 1.52, 2002/05/11 01:30:28
|
Line 44 March/April 01 Scott Harrison
|
Line 44 March/April 01 Scott Harrison
|
05/31 Scott Harrison |
05/31 Scott Harrison |
06/11,06/25,06/27,06/28,06/29,07/04 Gerd Kortemeyer |
06/11,06/25,06/27,06/28,06/29,07/04 Gerd Kortemeyer |
07/24,8/6,8/7,10/16 Scott Harrison |
07/24,8/6,8/7,10/16 Scott Harrison |
|
03/01/02 Matthew Hall |
--> |
--> |
|
|
|
|
Line 123 var parmflag=-1; // 1 means currently op
|
Line 124 var parmflag=-1; // 1 means currently op
|
// -1 means never yet opened/defined |
// -1 means never yet opened/defined |
|
|
var iconpath='/adm/lonIcons/'; |
var iconpath='/adm/lonIcons/'; |
|
var raticons='/adm/rat/'; |
|
|
function testfunction() { |
function testfunction() { |
inf.document.forms.resinfo.elements.t.value="ABC"; |
inf.document.forms.resinfo.elements.t.value="ABC"; |
} |
} |
|
|
// ------------------------------------------------ Insert a row into the table |
// ------------------------------------------------ Insert a row into the table |
|
|
function insertrow(j,ex1,ex2) { |
function insertrow(j,ex1,ex2) { |
var kj; |
var kj; |
stored=0; |
stored=0; |
Line 234 function insertrow(j,ex1,ex2) {
|
Line 235 function insertrow(j,ex1,ex2) {
|
} |
} |
|
|
// --------------------------------------------- Creates a new condition object |
// --------------------------------------------- Creates a new condition object |
|
|
function newcondition(content,type) { |
function newcondition(content,type) { |
var ko; |
var ko; |
stored=0; |
stored=0; |
Line 245 function newcondition(content,type) {
|
Line 245 function newcondition(content,type) {
|
} |
} |
|
|
// ---------------------------------------------- Creates a new resource object |
// ---------------------------------------------- Creates a new resource object |
|
|
function newresource(rid,cid,text,url,ext,type) { |
function newresource(rid,cid,text,url,ext,type) { |
stored=0; |
stored=0; |
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]= |
objcont[addobj(rid,'b&'+rid+'&'+cid+':0:0:0')]= |
Line 254 function newresource(rid,cid,text,url,ex
|
Line 253 function newresource(rid,cid,text,url,ex
|
|
|
|
|
// -------------------------------- Insert a condition into a port of an object |
// -------------------------------- Insert a condition into a port of an object |
|
|
function insertcond(obj1,portnr,cond) { |
function insertcond(obj1,portnr,cond) { |
var k; |
var k; |
stored=0; |
stored=0; |
Line 271 function insertcond(obj1,portnr,cond) {
|
Line 269 function insertcond(obj1,portnr,cond) {
|
|
|
// --------------------------------------------- Insert a column into the table |
// --------------------------------------------- Insert a column into the table |
// Inserts a new table column after table column j |
// Inserts a new table column after table column j |
|
|
function insertcol(j) { |
function insertcol(j) { |
var kj; |
var kj; |
stored=0; |
stored=0; |
Line 284 function insertcol(j) {
|
Line 281 function insertcol(j) {
|
} |
} |
|
|
// --------------------------------------------------------------- Find the row |
// --------------------------------------------------------------- Find the row |
|
|
function findrow(jid) { |
function findrow(jid) { |
var j; |
var j; |
for (j=0;j<=maxrow;j++) { if (row[j]==jid) { return j; } } |
for (j=0;j<=maxrow;j++) { if (row[j]==jid) { return j; } } |
Line 292 function findrow(jid) {
|
Line 288 function findrow(jid) {
|
} |
} |
|
|
// --------------------------------------------------------------- Find the col |
// --------------------------------------------------------------- Find the col |
|
|
function findcol(jid) { |
function findcol(jid) { |
var j; |
var j; |
for (j=0;j<=maxcol;j++) { if (col[j]==jid) { return j; } } |
for (j=0;j<=maxcol;j++) { if (col[j]==jid) { return j; } } |
Line 307 function findcol(jid) {
|
Line 302 function findcol(jid) {
|
// |
// |
// returns middle (col number of middle of obj1) |
// returns middle (col number of middle of obj1) |
// sets colmap (map of cols with object numbers) |
// sets colmap (map of cols with object numbers) |
|
|
function maprow (jid,obj1,ign) { |
function maprow (jid,obj1,ign) { |
var j; var k; var left; var right; var middle; |
var j; var k; var left; var right; var middle; |
middle=-1; |
middle=-1; |
Line 353 function maprow (jid,obj1,ign) {
|
Line 347 function maprow (jid,obj1,ign) {
|
// kid: colID, find point close to this |
// kid: colID, find point close to this |
// dkid: destination colID |
// dkid: destination colID |
// returns colID |
// returns colID |
|
|
function comingthru (jid,kid,dkid) { |
function comingthru (jid,kid,dkid) { |
var k; |
var k; |
maprow(jid,-1,1); |
maprow(jid,-1,1); |
Line 399 function comingthru (jid,kid,dkid) {
|
Line 392 function comingthru (jid,kid,dkid) {
|
// linkobj: object that the link goes to/comes from |
// linkobj: object that the link goes to/comes from |
// sets inrow or outrow |
// sets inrow or outrow |
// return column |
// return column |
|
|
|
|
function insertport (obj1,d,inout,linkobj) { |
function insertport (obj1,d,inout,linkobj) { |
|
|
var k; var port; var revport; |
var k; var port; var revport; |
stored=0; |
stored=0; |
data1=obj[obj1].split('&'); |
data1=obj[obj1].split('&'); |
Line 431 function insertport (obj1,d,inout,linkob
|
Line 421 function insertport (obj1,d,inout,linkob
|
if ((data3[k]==0) && (colmap[k]==obj1) && (port==-1)) { port=k; } |
if ((data3[k]==0) && (colmap[k]==obj1) && (port==-1)) { port=k; } |
} |
} |
} |
} |
|
|
if (port==-1) { |
if (port==-1) { |
if (colmap[k]==0) { |
if (colmap[k]==0) { |
revport=findcol(k); |
revport=findcol(k); |
Line 478 function insertport (obj1,d,inout,linkob
|
Line 467 function insertport (obj1,d,inout,linkob
|
|
|
// ---------------------------- Make a new object and add it to the row content |
// ---------------------------- Make a new object and add it to the row content |
// returns object number of generated object |
// returns object number of generated object |
|
|
function addobj(kjid,objs) { |
function addobj(kjid,objs) { |
stored=0; |
stored=0; |
expense++; |
expense++; |
Line 492 function addobj(kjid,objs) {
|
Line 480 function addobj(kjid,objs) {
|
|
|
// ---------------------------------------- Make horizontal connection for hrid |
// ---------------------------------------- Make horizontal connection for hrid |
// hoffs=-1: this line goes on top of hrid |
// hoffs=-1: this line goes on top of hrid |
|
|
function horizontal(hrid,hoffs,hfcol,htcol,hdest,hends) { |
function horizontal(hrid,hoffs,hfcol,htcol,hdest,hends) { |
hcrid=-1; |
hcrid=-1; |
if (hoffs==-1) { |
if (hoffs==-1) { |
Line 519 function horizontal(hrid,hoffs,hfcol,htc
|
Line 506 function horizontal(hrid,hoffs,hfcol,htc
|
} |
} |
} |
} |
} |
} |
|
|
if (hcrid==-1) { |
if (hcrid==-1) { |
insertrow(row[hrid]+hoffs,hfcol,htcol); |
insertrow(row[hrid]+hoffs,hfcol,htcol); |
addobj(maxrow,'h&'+maxrow+'&'+hfcol+':'+htcol+'&'+hdest+'&'+hends); |
addobj(maxrow,'h&'+maxrow+'&'+hfcol+':'+htcol+'&'+hdest+'&'+hends); |
Line 529 function horizontal(hrid,hoffs,hfcol,htc
|
Line 515 function horizontal(hrid,hoffs,hfcol,htc
|
} |
} |
|
|
// --------------------------------------- Deletes all references to object obj |
// --------------------------------------- Deletes all references to object obj |
|
|
function delobj(obj1) { |
function delobj(obj1) { |
var k; |
var k; |
stored=0; |
stored=0; |
Line 549 function delobj(obj1) {
|
Line 534 function delobj(obj1) {
|
} |
} |
|
|
// --------------------------------------------------------- Garbage collection |
// --------------------------------------------------------- Garbage collection |
|
|
function cleanup () { |
function cleanup () { |
message("Garbage Collection"); |
message("Garbage Collection"); |
var j,kj,i; |
var j,kj,i; |
Line 603 function cleanup () {
|
Line 587 function cleanup () {
|
rowtype[maxrow]=2; |
rowtype[maxrow]=2; |
coltype[maxcol]=2; |
coltype[maxcol]=2; |
} |
} |
|
|
} |
} |
|
|
// -------------------------------------------- Delete a condition from a block |
// -------------------------------------------- Delete a condition from a block |
|
|
function delcond(obj1,colid) { |
function delcond(obj1,colid) { |
var k; |
var k; |
stored=0; |
stored=0; |
Line 627 function delcond(obj1,colid) {
|
Line 609 function delcond(obj1,colid) {
|
} |
} |
|
|
// ----------------------------------------- Creates a new condition in a block |
// ----------------------------------------- Creates a new condition in a block |
|
|
function crecond(obj1,colid,condtext,condtype) { |
function crecond(obj1,colid,condtext,condtype) { |
var k; |
var k; |
data3=obj[obj1].split('&'); |
data3=obj[obj1].split('&'); |
Line 649 function crecond(obj1,colid,condtext,con
|
Line 630 function crecond(obj1,colid,condtext,con
|
// deletes the link linknr |
// deletes the link linknr |
// h&rowID&incolID:outcolID&inObj:outObj&inupdown:outupdown |
// h&rowID&incolID:outcolID&inObj:outObj&inupdown:outupdown |
// v&colID&inObj:outObj&updown |
// v&colID&inObj:outObj&updown |
|
|
function dellink (linknr) { |
function dellink (linknr) { |
var k; var obj1; var obj2; |
var k; var obj1; var obj2; |
stored=0; |
stored=0; |
Line 690 function dellink (linknr) {
|
Line 670 function dellink (linknr) {
|
|
|
// ----------------------------------------------------------- Join two objects |
// ----------------------------------------------------------- Join two objects |
// Links obj1 with obj2, creates new objlink, marks all elements with number |
// Links obj1 with obj2, creates new objlink, marks all elements with number |
|
|
function joinres (obj1,obj2,cond) { |
function joinres (obj1,obj2,cond) { |
stored=0; |
stored=0; |
var minexpense; |
var minexpense; |
Line 725 function joinres (obj1,obj2,cond) {
|
Line 704 function joinres (obj1,obj2,cond) {
|
minexpense=expense; |
minexpense=expense; |
} |
} |
|
|
|
|
if (best==0) { |
if (best==0) { |
finishload(); |
finishload(); |
tryjoin(obj1,obj2,cond,1,1); |
tryjoin(obj1,obj2,cond,1,1); |
Line 738 function joinres (obj1,obj2,cond) {
|
Line 716 function joinres (obj1,obj2,cond) {
|
finishload(); |
finishload(); |
tryjoin(obj1,obj2,cond,-1,1); |
tryjoin(obj1,obj2,cond,-1,1); |
} |
} |
|
|
} |
} |
|
|
|
|
function tryjoin(obj1,obj2,cond,d1,d2) { |
function tryjoin(obj1,obj2,cond,d1,d2) { |
var k; var kr; var outcol; var incol; var d; var dest; |
var k; var kr; var outcol; var incol; var d; var dest; |
|
|
Line 840 function tryjoin(obj1,obj2,cond,d1,d2) {
|
Line 816 function tryjoin(obj1,obj2,cond,d1,d2) {
|
// ---------------------------------------------------------- Delete a resource |
// ---------------------------------------------------------- Delete a resource |
// Deletes resource obj1 |
// Deletes resource obj1 |
// Reconnects resources going thru this one if recon=1 |
// Reconnects resources going thru this one if recon=1 |
|
|
function delres (obj1,recon) { |
function delres (obj1,recon) { |
var infromobj=new Array(); |
var infromobj=new Array(); |
var inwithcon=new Array(); |
var inwithcon=new Array(); |
Line 964 function delres (obj1,recon) {
|
Line 939 function delres (obj1,recon) {
|
} |
} |
|
|
// -------------------------------------------------------------- Draw an entry |
// -------------------------------------------------------------- Draw an entry |
|
|
function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { |
function drawcell (rtype,ctype,what,cm,obj1,ej,ek,ne) { |
var bgcolor; |
var bgcolor; |
var url=''; |
var url=''; |
Line 997 function drawcell (rtype,ctype,what,cm,o
|
Line 971 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="resource.gif">'); |
+' src="'+raticons+'resource.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
} else { |
} else { |
if (what=='c:') { |
if (what=='c:') { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="condition.gif">'); |
+' src="'+raticons+'condition.gif">'); |
} else { |
} else { |
if (what=='rs:') { |
if (what=='rs:') { |
mime=''; |
mime=''; |
Line 1030 function drawcell (rtype,ctype,what,cm,o
|
Line 1004 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="start.gif">'); |
+' src="'+raticons+'start.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
|
|
} else { |
} else { |
if (what=='rf:') { |
if (what=='rf:') { |
Line 1059 function drawcell (rtype,ctype,what,cm,o
|
Line 1033 function drawcell (rtype,ctype,what,cm,o
|
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
('<img border=0 width='+cw[ctype]+' height='+rh[1] |
+' src="finish.gif">'); |
+' src="'+raticons+'finish.gif">'); |
if ((mime!='') && (ext!='true')) { |
if ((mime!='') && (ext!='true')) { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="left.gif"></a><a target="preview" href="'+ |
('<br><img border=0 src="'+raticons+'left.gif"></a><a target="preview" href="'+ |
url+'.meta"><img border=0 src="'+iconpath+ |
url+'.meta"><img border=0 src="'+iconpath+ |
'meta.gif"><a target="preview" href="'+url+ |
'meta.gif"><a target="preview" href="'+url+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'"><img border=0 src="'+iconpath+mime+'.gif">'+ |
'<img border=0 src="right.gif">'); |
'<img border=0 src="'+raticons+'right.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="middle.gif">'); |
('<br><img border=0 src="'+raticons+'middle.gif">'); |
} |
} |
parent.mapout.document.write |
parent.mapout.document.write |
('<br><img border=0 src="bottom.gif">'); |
('<br><img border=0 src="'+raticons+'bottom.gif">'); |
} else { |
} else { |
parent.mapout.document.write |
parent.mapout.document.write |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
('<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="'+rtype+'.'+ctype+'.'+what+'.gif">'); |
+' src="'+raticons+rtype+'.'+ctype+'.'+what+'.gif">'); |
} |
} |
} |
} |
} |
} |
Line 1097 function drawcell (rtype,ctype,what,cm,o
|
Line 1071 function drawcell (rtype,ctype,what,cm,o
|
parent.mapout.document.write |
parent.mapout.document.write |
( |
( |
'<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
'<img border=0 width='+cw[ctype]+' height='+rh[rtype] |
+' src="'+rtype+'.'+ctype+'.empty.gif"></a>'); |
+' src="'+raticons+rtype+'.'+ctype+'.empty.gif"></a>'); |
} |
} |
parent.mapout.document.write('</td>'); |
parent.mapout.document.write('</td>'); |
} |
} |
} |
} |
|
|
// --------------------------------------------------------- Color of resources |
// --------------------------------------------------------- Color of resources |
|
|
function rescolor (ext,typ) { |
function rescolor (ext,typ) { |
var rc; var gc; var bc; |
var rc; var gc; var bc; |
if (ext=='true') { bc='55'; } else { bc='99'; } |
if (ext=='true') { bc='55'; } else { bc='99'; } |
Line 1115 function rescolor (ext,typ) {
|
Line 1088 function rescolor (ext,typ) {
|
} |
} |
|
|
// -------------------------------------------------------- Color of conditions |
// -------------------------------------------------------- Color of conditions |
|
|
function condcolor(typ) { |
function condcolor(typ) { |
if (typ=='stop') { return '#EEAAAA'; } |
if (typ=='stop') { return '#EEAAAA'; } |
if (typ=='force') { return '#AAAAEE'; } |
if (typ=='force') { return '#AAAAEE'; } |
Line 1123 function condcolor(typ) {
|
Line 1095 function condcolor(typ) {
|
} |
} |
|
|
// ----------------------------------------------------------------- Draw a row |
// ----------------------------------------------------------------- Draw a row |
|
|
function drawrow (jid) { |
function drawrow (jid) { |
var j; var jk; var k; var ck; var rtype; |
var j; var jk; var k; var ck; var rtype; |
var objd1=new Array(); |
var objd1=new Array(); |
Line 1327 if (rowtype[jid]!=0) {
|
Line 1298 if (rowtype[jid]!=0) {
|
} |
} |
|
|
// -------------------------------------------------------------- Print message |
// -------------------------------------------------------------- Print message |
|
|
function message(txt) { |
function message(txt) { |
parent.window.status=txt; |
parent.window.status=txt; |
} |
} |
|
|
// ------------------------------------------------------------- Draw the table |
// ------------------------------------------------------------- Draw the table |
|
|
function draw () { |
function draw () { |
var k; var kr; |
var k; var kr; |
|
|
Line 1382 function draw () {
|
Line 1351 function draw () {
|
} |
} |
|
|
// --------------------------------------------------------- Clears info window |
// --------------------------------------------------------- Clears info window |
|
|
function infoclear() { |
function infoclear() { |
if (notclear!=1) { |
if (notclear!=1) { |
infcheck(); |
infcheck(); |
Line 1430 function infoclear() {
|
Line 1398 function infoclear() {
|
} |
} |
|
|
// ------------------------------------------------------------ Open inf window |
// ------------------------------------------------------------ Open inf window |
|
|
function infopen() { |
function infopen() { |
var options="scrollbars=1,resizable=1,menubar=0,width=400,height=300"; |
var options="scrollbars=1,resizable=1,menubar=0,width=400,height=300"; |
inf=open("","infout",options); |
inf=open("","infout",options); |
} |
} |
|
|
// -------------------------------------------------------- Do inf status check |
// -------------------------------------------------------- Do inf status check |
|
|
function infcheck() { |
function infcheck() { |
if (inf.closed) { |
if (inf.closed) { |
infopen(); |
infopen(); |
Line 1445 function infcheck() {
|
Line 1411 function infcheck() {
|
} |
} |
|
|
// --------------------------------------------------- Prints out resource info |
// --------------------------------------------------- Prints out resource info |
|
|
function info(infostr) { |
function info(infostr) { |
var mime=''; |
var mime=''; |
var ext; |
var ext; |
Line 1457 function info(infostr) {
|
Line 1422 function info(infostr) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="info.gif"></td><td bgcolor="#AAFFAA">'); |
'<table><tr><td width=32><img src="'+raticons+'info.gif"></td><td bgcolor="#AAFFAA">'); |
data1=infostr.split('&'); |
data1=infostr.split('&'); |
if (data1[0]=='c') { |
if (data1[0]=='c') { |
inf.document.write('<b>Condition ('); |
inf.document.write('<b>Condition ('); |
Line 1538 function info(infostr) {
|
Line 1503 function info(infostr) {
|
} |
} |
|
|
// ------------------------------------------------ "Escapes" out special chars |
// ------------------------------------------------ "Escapes" out special chars |
|
|
function escape(instring) { |
function escape(instring) { |
var outstring=''; |
var outstring=''; |
var thischar; |
var thischar; |
Line 1546 function escape(instring) {
|
Line 1510 function escape(instring) {
|
for (k=0;k<instring.length;k++) { |
for (k=0;k<instring.length;k++) { |
thischar=instring.charAt(k); |
thischar=instring.charAt(k); |
if (thischar==':') { thischar=':'; } |
if (thischar==':') { thischar=':'; } |
if (thischar=='"') { thischar='"'; } |
if (thischar=='"') { thischar='"'; }// " |
if (thischar=="'") { thischar='''; } |
if (thischar=="'") { thischar='''; } |
if (thischar==',') { thischar=','; } |
if (thischar==',') { thischar=','; } |
outstring+=thischar; |
outstring+=thischar; |
Line 1555 function escape(instring) {
|
Line 1519 function escape(instring) {
|
} |
} |
|
|
// -------------------------------------------------- Insert resource into link |
// -------------------------------------------------- Insert resource into link |
|
|
function insertreslink(infostr) { |
function insertreslink(infostr) { |
var lnr; |
var lnr; |
var fobj; |
var fobj; |
Line 1588 function insertreslink(infostr) {
|
Line 1551 function insertreslink(infostr) {
|
} |
} |
|
|
// -------------------------------------------- Insert resource after condition |
// -------------------------------------------- Insert resource after condition |
|
|
function insertcondlink(cid,lnr) { |
function insertcondlink(cid,lnr) { |
var fobj; |
var fobj; |
var tobj; |
var tobj; |
Line 1609 function insertcondlink(cid,lnr) {
|
Line 1571 function insertcondlink(cid,lnr) {
|
joinres(nobj,tobj,0); |
joinres(nobj,tobj,0); |
} |
} |
|
|
|
|
|
|
|
|
// ------------------------------------------------------ Clears indexer window |
// ------------------------------------------------------ Clears indexer window |
|
|
function idxclear() { |
function idxclear() { |
idx.document.clear(); |
idx.document.clear(); |
} |
} |
|
|
// ------------------------------------------------------- Clears search window |
// ------------------------------------------------------- Clears search window |
|
|
function srchclear() { |
function srchclear() { |
srch.document.clear(); |
srch.document.clear(); |
} |
} |
|
|
// --------------------------------------------------------- Clears parm window |
// --------------------------------------------------------- Clears parm window |
|
|
function parmclear() { |
function parmclear() { |
parm.document.clear(); |
parm.document.clear(); |
} |
} |
|
|
// ------------------------------------------------------ Closes indexer window |
// ------------------------------------------------------ Closes indexer window |
|
|
function idxclose() { |
function idxclose() { |
if (idx && !idx.closed) { |
if (idx && !idx.closed) { |
idxflag=0; |
idxflag=0; |
Line 1640 function idxclose() {
|
Line 1595 function idxclose() {
|
} |
} |
|
|
// ------------------------------------------------------- Closes search window |
// ------------------------------------------------------- Closes search window |
|
|
function srchclose() { |
function srchclose() { |
if (srch && !srch.closed) { |
if (srch && !srch.closed) { |
srchflag=0; |
srchflag=0; |
Line 1649 function srchclose() {
|
Line 1603 function srchclose() {
|
} |
} |
|
|
// ------------------------------------------------------- Closes search window |
// ------------------------------------------------------- Closes search window |
|
|
function parmclose() { |
function parmclose() { |
if (parm && !parm.closed) { |
if (parm && !parm.closed) { |
parmflag=0; |
parmflag=0; |
Line 1658 function parmclose() {
|
Line 1611 function parmclose() {
|
} |
} |
|
|
// -------------------------------------------------------- Open indexer window |
// -------------------------------------------------------- Open indexer window |
|
|
function idxopen(mode) { |
function idxopen(mode) { |
var options="scrollbars=1,resizable=1,menubar=0"; |
var options="scrollbars=1,resizable=1,menubar=0"; |
idxmode=mode; |
idxmode=mode; |
idxflag=1; |
idxflag=1; |
idx=open("/res/?launch=1&catalogmode="+mode,"idxout",options); |
idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); |
idx.focus(); |
idx.focus(); |
} |
} |
|
|
// --------------------------------------------------------- Open search window |
// --------------------------------------------------------- Open search window |
|
|
function srchopen(mode) { |
function srchopen(mode) { |
var options="scrollbars=1,resizable=1,menubar=0"; |
var options="scrollbars=1,resizable=1,menubar=0"; |
srchmode=mode; |
srchmode=mode; |
srchflag=1; |
srchflag=1; |
srch=open("/adm/searchcat?launch=1&catalogmode="+mode,"srchout",options); |
srch=open("/adm/searchcat?launch=1&mode=rat&catalogmode="+mode,"srchout",options); |
srch.focus(); |
srch.focus(); |
} |
} |
|
|
// -------------------------------------------- Interface function to searching |
// -------------------------------------------- Interface function to searching |
|
|
function search() { |
function search() { |
alert("Searching not yet implemented"); |
alert("Searching not yet implemented"); |
} |
} |
|
|
// ------------------------------------------------------- Do srch status check |
// ------------------------------------------------------- Do srch status check |
|
|
function srchcheck(mode) { |
function srchcheck(mode) { |
if (!srch || srch.closed || srchmode!=mode) { |
if (!srch || srch.closed || srchmode!=mode) { |
srchopen(mode); |
srchopen(mode); |
Line 1693 function srchcheck(mode) {
|
Line 1642 function srchcheck(mode) {
|
} |
} |
|
|
// -------------------------------------------------------- Do idx status check |
// -------------------------------------------------------- Do idx status check |
|
|
function idxcheck(mode) { |
function idxcheck(mode) { |
if (!idx || idx.closed || idxmode!=mode) { |
if (!idx || idx.closed || idxmode!=mode) { |
idxopen(mode); |
idxopen(mode); |
Line 1702 function idxcheck(mode) {
|
Line 1650 function idxcheck(mode) {
|
} |
} |
|
|
// ---------------------------------------------------- Handles "click to edit" |
// ---------------------------------------------------- Handles "click to edit" |
|
|
function handler(infostr) { |
function handler(infostr) { |
var k; |
var k; |
editmode=1; |
editmode=1; |
Line 1711 function handler(infostr) {
|
Line 1658 function handler(infostr) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">'); |
'<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">'); |
data1=infostr.split('&'); |
data1=infostr.split('&'); |
if (data1[0]=='c') { |
if (data1[0]=='c') { |
inf.document.writeln('<b>Condition</b><hr>'); |
inf.document.writeln('<b>Condition</b><hr>'); |
Line 1765 function handler(infostr) {
|
Line 1712 function handler(infostr) {
|
'opener.insertcondlink('+data1[1]+','+data1[3]+');'+ |
'opener.insertcondlink('+data1[1]+','+data1[3]+');'+ |
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw(' |
+');">Insert Resource Into Link</a>'); |
+');">Insert Resource Into Link</a>'); |
|
|
|
|
} else { |
} else { |
if (data1[0]=='r') { |
if (data1[0]=='r') { |
if (linkmode!=0) { |
if (linkmode!=0) { |
Line 1873 function handler(infostr) {
|
Line 1818 function handler(infostr) {
|
} |
} |
|
|
// ----------------------------------------------------- Clicks on empty fields |
// ----------------------------------------------------- Clicks on empty fields |
|
|
function empty(rid,k) { |
function empty(rid,k) { |
var cid=findcol(k); |
var cid=findcol(k); |
var lcol=k-1; |
var lcol=k-1; |
Line 1886 function empty(rid,k) {
|
Line 1830 function empty(rid,k) {
|
inf.document.clear(); |
inf.document.clear(); |
inf.document.writeln( |
inf.document.writeln( |
'<html><body bgcolor="#FFFFFF">'+ |
'<html><body bgcolor="#FFFFFF">'+ |
'<table><tr><td width=32><img src="edit.gif"></td><td bgcolor="#AAFFAA">'+ |
'<table><tr><td width=32><img src="'+raticons+'edit.gif"></td><td bgcolor="#AAFFAA">'+ |
'<b>Empty Field</b><hr>'); |
'<b>Empty Field</b><hr>'); |
|
|
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
inf.document.writeln('<br><a href="javascript:opener.newresource('+ |
Line 1943 function empty(rid,k) {
|
Line 1887 function empty(rid,k) {
|
} |
} |
|
|
// ---------------------------------------------------- Save into hidden fields |
// ---------------------------------------------------- Save into hidden fields |
|
|
function save() { |
function save() { |
var k; |
var k; |
if (graphdef=='yes') { |
if (graphdef=='yes') { |
Line 2002 function save() {
|
Line 1945 function save() {
|
} |
} |
|
|
// ----------------------------------------------- Reset all layout information |
// ----------------------------------------------- Reset all layout information |
|
|
function graphreset() { |
function graphreset() { |
|
|
var k; |
var k; |
Line 2035 function graphreset() {
|
Line 1977 function graphreset() {
|
} |
} |
|
|
// --------------------- Compare two resources with each other for "straighten" |
// --------------------- Compare two resources with each other for "straighten" |
|
|
function rescompare(a,b) { |
function rescompare(a,b) { |
data1=a.split(':'); |
data1=a.split(':'); |
data2=b.split(':'); |
data2=b.split(':'); |
Line 2052 function rescompare(a,b) {
|
Line 1993 function rescompare(a,b) {
|
} |
} |
|
|
// -------------------------------------------- Draw the table instead of graph |
// -------------------------------------------- Draw the table instead of graph |
|
|
function tabledraw() { |
function tabledraw() { |
var objsorted=new Array(); |
var objsorted=new Array(); |
var robjs=new Array(); |
var robjs=new Array(); |
Line 2229 function tabledraw() {
|
Line 2169 function tabledraw() {
|
} |
} |
|
|
// ----------------------------------------------------- Insert Resource Output |
// ----------------------------------------------------- Insert Resource Output |
|
|
function insrestab(irow,be,af,typ) { |
function insrestab(irow,be,af,typ) { |
parent.mapout.document.writeln('<tr><td colspan=2>'+ |
parent.mapout.document.writeln('<tr><td colspan=2>'+ |
'<table><tr><td><a href="javascript:parent.code.insertrow(' |
'<table><tr><td><a href="javascript:parent.code.insertrow(' |
Line 2271 function insrestab(irow,be,af,typ) {
|
Line 2210 function insrestab(irow,be,af,typ) {
|
} |
} |
parent.mapout.document.writeln('</td></tr></table></tr>'); |
parent.mapout.document.writeln('</td></tr></table></tr>'); |
} |
} |
// ---------------------------------------- Draw simple table instead of graph |
|
|
|
|
// ---------------------------------------- Draw simple table instead of graph |
function simpletabledraw() { |
function simpletabledraw() { |
var objsorted=new Array(); |
var objsorted=new Array(); |
var robjs=new Array(); |
var robjs=new Array(); |
Line 2377 function simpletabledraw() {
|
Line 2316 function simpletabledraw() {
|
} |
} |
|
|
// ---------------------------------- Sort objects to straighten graph or table |
// ---------------------------------- Sort objects to straighten graph or table |
|
|
function sortobjs() { |
function sortobjs() { |
message("Sorting Resources: "+funny); |
message("Sorting Resources: "+funny); |
var k; |
var k; |
Line 2450 function sortobjs() {
|
Line 2388 function sortobjs() {
|
} |
} |
|
|
// ----------------------------------------------------------- Straighten graph |
// ----------------------------------------------------------- Straighten graph |
|
|
function graphopt() { |
function graphopt() { |
var k; |
var k; |
var kj; |
var kj; |
var ij; |
var ij; |
|
|
var objsorted=new Array(); |
var objsorted=new Array(); |
condense(); |
condense(); |
graphreset(); |
graphreset(); |
Line 2515 function graphopt() {
|
Line 2451 function graphopt() {
|
} |
} |
|
|
// ----------------------------------------------------------- Remove e-objects |
// ----------------------------------------------------------- Remove e-objects |
|
|
function condense() { |
function condense() { |
message("Condensing"); |
message("Condensing"); |
var j; |
var j; |
Line 2536 function condense() {
|
Line 2471 function condense() {
|
} |
} |
|
|
// ---------------------------------------------------- Load from hidden fields |
// ---------------------------------------------------- Load from hidden fields |
|
|
function load() { |
function load() { |
message("Loading"); |
message("Loading"); |
schedule('load'); |
schedule('load'); |
Line 2589 function finishload() {
|
Line 2523 function finishload() {
|
} |
} |
|
|
// -------------------------------------------------------------- Parameter set |
// -------------------------------------------------------------- Parameter set |
|
|
function setparms(resid) { |
function setparms(resid) { |
var options="scrollbars=1,resizable=1,menubar=0"; |
var options="scrollbars=1,resizable=1,menubar=0"; |
parmflag=1; |
parmflag=1; |
Line 2600 function setparms(resid) {
|
Line 2533 function setparms(resid) {
|
} |
} |
|
|
// -------------------------------------------------------------- Undo function |
// -------------------------------------------------------------- Undo function |
|
|
function undo() { |
function undo() { |
if (undopointer>1) { |
if (undopointer>1) { |
undopointer--; |
undopointer--; |
Line 2616 function undo() {
|
Line 2548 function undo() {
|
} |
} |
|
|
// -------------------------------------------------------------- Redo function |
// -------------------------------------------------------------- Redo function |
|
|
function redo() { |
function redo() { |
if (undopointer<undostack.length-1) { |
if (undopointer<undostack.length-1) { |
undopointer++; |
undopointer++; |
Line 2632 function redo() {
|
Line 2563 function redo() {
|
} |
} |
|
|
// ------------------------------------------------------------ Revert function |
// ------------------------------------------------------------ Revert function |
|
|
function revert() { |
function revert() { |
if (confirm("Revert to beginning of edit session?")) { |
if (confirm("Revert to beginning of edit session?")) { |
undopointer=2; |
undopointer=2; |
Line 2641 function revert() {
|
Line 2571 function revert() {
|
} |
} |
|
|
// ---------------------------------------------------------------- Wheelswitch |
// ---------------------------------------------------------------- Wheelswitch |
|
|
function wheelswitch() { |
function wheelswitch() { |
if (funny=='|') { |
if (funny=='|') { |
funny='/'; |
funny='/'; |
Line 2659 function wheelswitch() {
|
Line 2588 function wheelswitch() {
|
} |
} |
|
|
// --------------------------------------------- Checks if server frame defined |
// --------------------------------------------- Checks if server frame defined |
|
|
function checkdef() { |
function checkdef() { |
if (parent.flag==1) { |
if (parent.flag==1) { |
srvloaded(); |
srvloaded(); |
Line 2668 function checkdef() {
|
Line 2596 function checkdef() {
|
} |
} |
|
|
// ---------------------------------------------------------- The wait function |
// ---------------------------------------------------------- The wait function |
|
|
function wait() { |
function wait() { |
if ((finishdone==1) || (tim==1)) { |
if ((finishdone==1) || (tim==1)) { |
if (tim==0) { |
if (tim==0) { |
Line 2686 function wait() {
|
Line 2613 function wait() {
|
} |
} |
|
|
// ---------------------------------------------------------- Schedule function |
// ---------------------------------------------------------- Schedule function |
|
|
function schedule(action) { |
function schedule(action) { |
reqaction=action; |
reqaction=action; |
tim=0; |
tim=0; |
Line 2697 function schedule(action) {
|
Line 2623 function schedule(action) {
|
} |
} |
|
|
// ----------------------------------------------------- launch indexer browser |
// ----------------------------------------------------- launch indexer browser |
|
|
function groupsearch() { |
function groupsearch() { |
srchcheck('groupsearch'); |
srchcheck('groupsearch'); |
} |
} |
Line 2707 function groupimport() {
|
Line 2632 function groupimport() {
|
} |
} |
|
|
// -------------------------------------------------------------- Store changes |
// -------------------------------------------------------------- Store changes |
|
|
function storechange() { |
function storechange() { |
var k; |
var k; |
parent.flag=0; |
parent.flag=0; |
Line 2722 function finishsave() {
|
Line 2646 function finishsave() {
|
} |
} |
|
|
// --------------------------------------- Gets called when submission finished |
// --------------------------------------- Gets called when submission finished |
|
|
function srvloaded() { |
function srvloaded() { |
finishdone=1; |
finishdone=1; |
message("Server replied."); |
message("Server replied."); |
} |
} |
|
|
// ---------------------------------------------------------------- Toggle Mode |
// ---------------------------------------------------------------- Toggle Mode |
|
|
function togglemode() { |
function togglemode() { |
if (tablemode==0) { |
if (tablemode==0) { |
tablemode=1; |
tablemode=1; |
Line 2746 function togglemode() {
|
Line 2668 function togglemode() {
|
} |
} |
|
|
// -------------------------------------------------------- Main program onLoad |
// -------------------------------------------------------- Main program onLoad |
|
|
function main() { |
function main() { |
|
|
if (mainrun==0) { |
if (mainrun==0) { |
infopen(); |
infopen(); |
infoclear(); |
infoclear(); |
Line 2756 function main() {
|
Line 2676 function main() {
|
stored=1; |
stored=1; |
mainrun=1; |
mainrun=1; |
} |
} |
|
|
} |
} |
|
|
// ---------------------------------------------------------- Close the window? |
// ---------------------------------------------------------- Close the window? |
|
|
function leave() { |
function leave() { |
if (!inf.closed) { |
if (!inf.closed) { |
inf.close(); |
inf.close(); |
Line 2789 function leave() {
|
Line 2707 function leave() {
|
<td bgcolor="#ffffcc"><a href="javascript:redo();"><b>R</b>edo</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:redo();"><b>R</b>edo</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupsearch();"><b>G</b>roup search</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupsearch();"><b>G</b>roup search</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupimport();"><b>G</b>roup import</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:groupimport();"><b>G</b>roup import</a> </td> |
<td bgcolor="#ffcccc"><a href="javascript:storechange();"><b>S</b>ave map</a> </td> |
<td bgcolor="#ffffcc"><a href="javascript:graphdef='no';save();storechange();"><b>S</b>ave map</a> </td> |
|
<td bgcolor="#ccffcc"><a href="javascript:storechange();"><b>S</b>ave map and layout</a> </td> |
</tr></table> |
</tr></table> |
</td></tr></table> |
</td></tr></table> |
<script> |
<script> |