--- rat/client/Attic/code.html 2001/06/27 19:19:06 1.38
+++ rat/client/Attic/code.html 2002/03/01 14:58:27 1.49
@@ -3,6 +3,32 @@
@@ -101,7 +130,6 @@ function testfunction() {
}
// ------------------------------------------------ Insert a row into the table
-
function insertrow(j,ex1,ex2) {
var kj;
stored=0;
@@ -120,7 +148,7 @@ function insertrow(j,ex1,ex2) {
objects=objects1+':'+objects2;
data1=objects.split(':');
for (kj=0;kj');
- if ((what!='') && (what!=undefined)) {
- if ((obj1!='') && (obj1!=undefined)) {
+ if ((what!='') && (typeof(what)!="undefined")) {
+ if ((obj1!='') && (typeof(obj1)!="undefined")) {
objref="'"+obj1+"'";
parent.mapout.document.write
('');
- if (mime!='') {
+ if ((mime!='') && (ext!='true')) {
parent.mapout.document.write
- ('
');
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
}
+ parent.mapout.document.write
+ ('
');
} else {
if (what=='c:') {
parent.mapout.document.write
@@ -978,14 +991,61 @@ function drawcell (rtype,ctype,what,cm,o
+' src="condition.gif">');
} else {
if (what=='rs:') {
+ mime='';
+ objnum=(obj1.split('&'))[1];
+ if (typeof(objcont[objnum])!="undefined") {
+ urlparts=objcont[objnum].split(':');
+ url=urlparts[1];
+ ext=urlparts[2];
+ urlparts=url.split('.');
+ mime=urlparts[urlparts.length-1];
+ if (typeof(mime)=="undefined") { mime=''; }
+ }
parent.mapout.document.write
- ('');
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
+ parent.mapout.document.write
+ ('
');
+
} else {
if (what=='rf:') {
+ mime='';
+ objnum=(obj1.split('&'))[1];
+ if (typeof(objcont[objnum])!="undefined") {
+ urlparts=objcont[objnum].split(':');
+ url=urlparts[1];
+ ext=urlparts[2];
+ urlparts=url.split('.');
+ mime=urlparts[urlparts.length-1];
+ if (typeof(mime)=="undefined") { mime=''; }
+ }
parent.mapout.document.write
- ('');
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
+ parent.mapout.document.write
+ ('
');
} else {
parent.mapout.document.write
('');
}
} else {
@@ -1017,7 +1077,6 @@ function drawcell (rtype,ctype,what,cm,o
}
// --------------------------------------------------------- Color of resources
-
function rescolor (ext,typ) {
var rc; var gc; var bc;
if (ext=='true') { bc='55'; } else { bc='99'; }
@@ -1028,7 +1087,6 @@ function rescolor (ext,typ) {
}
// -------------------------------------------------------- Color of conditions
-
function condcolor(typ) {
if (typ=='stop') { return '#EEAAAA'; }
if (typ=='force') { return '#AAAAEE'; }
@@ -1036,7 +1094,6 @@ function condcolor(typ) {
}
// ----------------------------------------------------------------- Draw a row
-
function drawrow (jid) {
var j; var jk; var k; var ck; var rtype;
var objd1=new Array();
@@ -1051,7 +1108,7 @@ if (rowtype[jid]!=0) {
}
parent.mapout.document.writeln('');
- if ((rowcont[jid]!='') && (rowcont[jid]!=undefined)) {
+ if ((rowcont[jid]!='') && (typeof(rowcont[jid])!="undefined")) {
data2=rowcont[jid].split(':');
for (jk=0;jkmiddle) {
for (k=middle+1;kleftin;k--) {
- if ((colmap4[k]!='') && (colmap4[k]!=undefined)) {
+ if ((colmap4[k]!='') && (typeof(colmap4[k])!="undefined")) {
colmap[k]='lrt';
} else {
colmap[k]='lr';
@@ -1138,7 +1195,7 @@ if (rowtype[jid]!=0) {
if (rightoutmiddle) {
- if ((colmap3[middle]!='') && (colmap3[middle]!=undefined)) {
+ if ((colmap3[middle]!='') && (typeof(colmap3[middle])!="undefined")) {
colmap2[middle]='rtdl';
} else {
colmap2[middle]='rtl';
@@ -1147,7 +1204,7 @@ if (rowtype[jid]!=0) {
}
if (leftoutleftout;k--) {
- if ((colmap3[k]!='') && (colmap3[k]!=undefined)) {
+ if ((colmap3[k]!='') && (typeof(colmap3[k])!="undefined")) {
colmap2[k]='rld';
} else {
colmap2[k]='rl';
@@ -1157,7 +1214,7 @@ if (rowtype[jid]!=0) {
}
if (rightout>middle) {
for (k=middle+1;k');
+ '"> ');
}
inf.document.write('');
if (data2[2]=='true') { inf.document.write('External '); }
@@ -1448,7 +1502,6 @@ function info(infostr) {
}
// ------------------------------------------------ "Escapes" out special chars
-
function escape(instring) {
var outstring='';
var thischar;
@@ -1463,9 +1516,9 @@ function escape(instring) {
}
return outstring;
}
+// There must be a way to get rid of the odd number of "s
// -------------------------------------------------- Insert resource into link
-
function insertreslink(infostr) {
var lnr;
var fobj;
@@ -1498,7 +1551,6 @@ function insertreslink(infostr) {
}
// -------------------------------------------- Insert resource after condition
-
function insertcondlink(cid,lnr) {
var fobj;
var tobj;
@@ -1519,29 +1571,22 @@ function insertcondlink(cid,lnr) {
joinres(nobj,tobj,0);
}
-
-
-
// ------------------------------------------------------ Clears indexer window
-
function idxclear() {
idx.document.clear();
}
// ------------------------------------------------------- Clears search window
-
function srchclear() {
srch.document.clear();
}
// --------------------------------------------------------- Clears parm window
-
function parmclear() {
parm.document.clear();
}
// ------------------------------------------------------ Closes indexer window
-
function idxclose() {
if (idx && !idx.closed) {
idxflag=0;
@@ -1550,7 +1595,6 @@ function idxclose() {
}
// ------------------------------------------------------- Closes search window
-
function srchclose() {
if (srch && !srch.closed) {
srchflag=0;
@@ -1559,7 +1603,6 @@ function srchclose() {
}
// ------------------------------------------------------- Closes search window
-
function parmclose() {
if (parm && !parm.closed) {
parmflag=0;
@@ -1568,42 +1611,37 @@ function parmclose() {
}
// -------------------------------------------------------- Open indexer window
-
function idxopen(mode) {
var options="scrollbars=1,resizable=1,menubar=0";
idxmode=mode;
idxflag=1;
- idx=open("/res?catalogmode="+mode,"idxout",options);
+ idx=open("/res/?launch=1&catalogmode="+mode,"idxout",options);
idx.focus();
}
// --------------------------------------------------------- Open search window
-
function srchopen(mode) {
var options="scrollbars=1,resizable=1,menubar=0";
srchmode=mode;
srchflag=1;
- srch=open("/adm/searchcat?catalogmode=interactive","srchout",options);
+ srch=open("/adm/searchcat?launch=1&catalogmode="+mode,"srchout",options);
srch.focus();
}
// -------------------------------------------- Interface function to searching
-
function search() {
alert("Searching not yet implemented");
}
// ------------------------------------------------------- Do srch status check
-
function srchcheck(mode) {
if (!srch || srch.closed || srchmode!=mode) {
- srchopen();
+ srchopen(mode);
}
srch.focus();
}
// -------------------------------------------------------- Do idx status check
-
function idxcheck(mode) {
if (!idx || idx.closed || idxmode!=mode) {
idxopen(mode);
@@ -1612,7 +1650,6 @@ function idxcheck(mode) {
}
// ---------------------------------------------------- Handles "click to edit"
-
function handler(infostr) {
var k;
editmode=1;
@@ -1658,7 +1695,7 @@ function handler(infostr) {
}
inf.document.writeln(
'opener.infoclear();opener.editmode=0;opener.draw('
- +');">Change to above values '
+ +');">Save Changes '
+' Reset
'
+'');
@@ -1675,8 +1712,6 @@ function handler(infostr) {
'opener.insertcondlink('+data1[1]+','+data1[3]+');'+
'opener.editmode=0;opener.notclear=0;opener.infoclear();opener.draw('
+');">Insert Resource Into Link');
-
-
} else {
if (data1[0]=='r') {
if (linkmode!=0) {
@@ -1732,7 +1767,7 @@ function handler(infostr) {
+'+self.document.forms.resinfo.elements.e.checked+'+"':'"
+'+self.document.forms.resinfo.elements.h.value+'+"':res'"
+';opener.infoclear();opener.editmode=0;opener.draw();">'
- +'Change to above values '
+ +'Save Changes '
+' Reset'
+'
');
if ((data2[3]!='start') && (data2[3]!='finish')) {
@@ -1776,14 +1811,13 @@ function handler(infostr) {
}
inf.document.writeln(
'
Done');
+ +'opener.infoclear();">Cancel');
inf.document.writeln('