--- rat/client/Attic/code.html 2000/07/28 21:36:13 1.8
+++ rat/client/Attic/code.html 2003/02/03 18:03:53 1.63
@@ -3,14 +3,44 @@
@@ -30,6 +60,7 @@ var colmap5=new Array();
var colmap6=new Array();
var obj=new Array();
var objcont=new Array();
+var objparms=new Array();
var objlinks=new Array();
var rowcont=new Array();
var rowtype=new Array();
@@ -62,6 +93,8 @@ var funny='|';
var reqaction='';
var canceltim;
+var expense=0;
+
var data1=new Array(1024);
var data2=new Array(1024);
var data3=new Array(1024);
@@ -69,12 +102,41 @@ var data4=new Array(1024);
var data5=new Array(1024);
var inf;
+var srch;
+var srchflag=-1; // 1 means currently open
+ // 0 means closed (but has been open)
+ // -1 means never yet opened/defined
+var srchmode='';
+
+var idx;
+var idxflag=-1; // 1 means currently open
+ // 0 means closed (but has been open)
+ // -1 means never yet opened/defined
+var idxmode='';
+
+var copydx;
+var copydxflag=-1; // 1 means currently open
+ // 0 means closed (but has been open)
+ // -1 means never yet opened/defined
+var copydxmode='';
+
+var parm;
+var parmflag=-1; // 1 means currently open
+ // 0 means closed (but has been open)
+ // -1 means never yet opened/defined
+
+var iconpath='/adm/lonIcons/';
+var raticons='/adm/rat/';
-// ------------------------------------------------ Insert a row into the table
+function testfunction() {
+ inf.document.forms.resinfo.elements.t.value="ABC";
+}
+// ------------------------------------------------ Insert a row into the table
function insertrow(j,ex1,ex2) {
var kj;
stored=0;
+ expense++; expense++;
objects1='';
objects2='';
for (kj=0;kj<=maxrow;kj++) {
@@ -89,7 +151,7 @@ function insertrow(j,ex1,ex2) {
objects=objects1+':'+objects2;
data1=objects.split(':');
for (kj=0;kjj ) { col[kj]++; }
}
maxcol++;
+ expense++; expense++;
col[maxcol]=j+1;
}
// --------------------------------------------------------------- Find the row
-
function findrow(jid) {
var j;
for (j=0;j<=maxrow;j++) { if (row[j]==jid) { return j; } }
@@ -232,7 +290,6 @@ function findrow(jid) {
}
// --------------------------------------------------------------- Find the col
-
function findcol(jid) {
var j;
for (j=0;j<=maxcol;j++) { if (col[j]==jid) { return j; } }
@@ -247,12 +304,11 @@ function findcol(jid) {
//
// returns middle (col number of middle of obj1)
// sets colmap (map of cols with object numbers)
-
function maprow (jid,obj1,ign) {
var j; var k; var left; var right; var middle;
middle=-1;
for (j=0;j<=maxcol;j++) { colmap[j]=0; }
- if (rowcont[jid]!='') {
+ if ((rowcont[jid]!='') && (typeof(rowcont[jid])!="undefined")) {
data2=rowcont[jid].split(':');
for (j=0;j');
- if (what!='') {
- if (obj1!='') {
- obj1="'"+obj1+"'";
+ if ((what!='') && (typeof(what)!="undefined")) {
+ if ((obj1!='') && (typeof(obj1)!="undefined")) {
+ objref="'"+obj1+"'";
parent.mapout.document.write
- ('');
+ ('');
}
if (what=='r:') {
+ 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=''; }
+ mime=mime.toLowerCase();
+ }
+ parent.mapout.document.write
+ ('');
+ if (zscale==3) {
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
parent.mapout.document.write
- ('');
+ ('
');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
} else {
if (what=='c:') {
parent.mapout.document.write
('');
+ +' src="'+raticons+'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=''; }
+ mime=mime.toLowerCase();
+ }
parent.mapout.document.write
- ('');
+ ('');
+ if (zscale==3) {
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
+ parent.mapout.document.write
+ ('
');
+ } else {
+ 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=''; }
+ mime=mime.toLowerCase();
+ }
parent.mapout.document.write
- ('');
+ ('');
+ if (zscale==3) {
+ if ((mime!='') && (ext!='true')) {
+ parent.mapout.document.write
+ ('
'+
+ '');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
+ parent.mapout.document.write
+ ('
');
+ } else {
+ parent.mapout.document.write
+ ('
');
+ }
+
} else {
parent.mapout.document.write
('');
+ +' src="'+raticons+rtype+'.'+ctype+'.'+what+'.gif">');
}
}
}
}
- if (obj1!='') {
+ if ((obj1!='') && (typeof(obj1)!="undefined")) {
parent.mapout.document.write('');
}
} else {
@@ -899,14 +1095,13 @@ function drawcell (rtype,ctype,what,cm,o
parent.mapout.document.write
(
'');
+ +' src="'+raticons+rtype+'.'+ctype+'.empty.gif">');
}
parent.mapout.document.write('');
}
}
// --------------------------------------------------------- Color of resources
-
function rescolor (ext,typ) {
var rc; var gc; var bc;
if (ext=='true') { bc='55'; } else { bc='99'; }
@@ -917,7 +1112,6 @@ function rescolor (ext,typ) {
}
// -------------------------------------------------------- Color of conditions
-
function condcolor(typ) {
if (typ=='stop') { return '#EEAAAA'; }
if (typ=='force') { return '#AAAAEE'; }
@@ -925,7 +1119,6 @@ function condcolor(typ) {
}
// ----------------------------------------------------------------- Draw a row
-
function drawrow (jid) {
var j; var jk; var k; var ck; var rtype;
var objd1=new Array();
@@ -940,7 +1133,7 @@ if (rowtype[jid]!=0) {
}
parent.mapout.document.writeln('');
- if (rowcont[jid]!='') {
+ if ((rowcont[jid]!='') && (typeof(rowcont[jid])!="undefined")) {
data2=rowcont[jid].split(':');
for (jk=0;jkmiddle) {
for (k=middle+1;kleftin;k--) {
- if (colmap4[k]!='') {
+ if ((colmap4[k]!='') && (typeof(colmap4[k])!="undefined")) {
colmap[k]='lrt';
} else {
colmap[k]='lr';
@@ -1027,7 +1220,7 @@ if (rowtype[jid]!=0) {
if (rightoutmiddle) {
- if (colmap3[middle]!='') {
+ if ((colmap3[middle]!='') && (typeof(colmap3[middle])!="undefined")) {
colmap2[middle]='rtdl';
} else {
colmap2[middle]='rtl';
@@ -1036,7 +1229,7 @@ if (rowtype[jid]!=0) {
}
if (leftoutleftout;k--) {
- if (colmap3[k]!='') {
+ if ((colmap3[k]!='') && (typeof(colmap3[k])!="undefined")) {
colmap2[k]='rld';
} else {
colmap2[k]='rl';
@@ -1046,7 +1239,7 @@ if (rowtype[jid]!=0) {
}
if (rightout>middle) {
for (k=middle+1;k