--- rat/client/Attic/code.html 2001/01/17 19:48:33 1.13 +++ rat/client/Attic/code.html 2001/03/15 18:07:01 1.26 @@ -10,7 +10,7 @@ Resource Assembly Tool 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, 6/7,6/8,6/9,6/10,6/12,6/15,7/4,7/26,7/28,7/31,8/5,8/19,8/24, -01/17/01 Gerd Kortemeyer with Scott Harrison +01/17/01,03/03,03/05 Gerd Kortemeyer with Scott Harrison --> @@ -30,6 +30,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(); @@ -71,6 +72,11 @@ var data4=new Array(1024); var data5=new Array(1024); var inf; +var srch; + +function testfunction() { + inf.document.forms.resinfo.elements.t.value="ABC"; +} // ------------------------------------------------ Insert a row into the table @@ -1280,7 +1286,9 @@ function infoclear() { } inf.document.writeln(''); inf.document.close(); - parent.focus(); + srchclose(); + + parent.top.focus(); parent.mapout.focus(); notclear=1; lastinfo=''; @@ -1373,7 +1381,7 @@ function info(infostr) { } inf.document.writeln(''); inf.document.close(); - parent.focus(); + parent.top.focus(); parent.mapout.focus(); notclear=0; lastinfo=infostr; @@ -1452,6 +1460,46 @@ function insertcondlink(cid,lnr) { joinres(nobj,tobj,0); } + + + +// ------------------------------------------------------- Clears search window + +function srchclear() { + srch.document.clear(); +} + +// ------------------------------------------------------- Closes search window + +function srchclose() { + if (srch && !srch.closed) { + srch.close(); + } +} + +// --------------------------------------------------------- Open search window + +function srchopen() { + var options="scrollbars=1,resizable=1,menubar=0"; + srch=open("/adm/searchcat?catalogmode=interactive","srchout",options); + srch.focus(); +} + +// -------------------------------------------- Interface function to searching + +function search() { + alert("Searching not yet implemented"); +} + +// ------------------------------------------------------- Do srch status check + +function srchcheck() { + if (!srch || srch.closed) { + srchopen(); + } + srch.focus(); +} + // ---------------------------------------------------- Handles "click to edit" function handler(infostr) { @@ -1539,16 +1587,16 @@ function handler(infostr) { } } inf.document.write( - '
Title:' + ''); if ((data2[3]!='start') && (data2[3]!='finish')) { - inf.document.write('' +'' - +'' + +''); } inf.document.writeln( - ''); + 'Link resource'); } + parent.mapout.document.writeln( + '
Set Parameters'); + + parent.mapout.document.writeln(''); parent.mapout.document.writeln('
Title:' +'
URL:' + inf.document.write('
URL:' +'
External:
' + inf.document.write('>Search
' +'
Link Resource'); } + inf.document.writeln( + '
Set Parameters'); + } } else { linkmode=0; @@ -1894,8 +1947,13 @@ function tabledraw() { parent.mapout.document.writeln( ''+ - 'Link resource
'); for (j=2;j' +'Insert resource linked to from above
'); @@ -1972,7 +2031,9 @@ function insrestab(irow,be,af,typ) { '' +'Insert resource linked to from above and linking to below
'); @@ -1982,6 +2043,7 @@ function insrestab(irow,be,af,typ) { '' +'Insert resource linking to below
'); @@ -2283,6 +2345,12 @@ function finishload() { } } +// -------------------------------------------------------------- Parameter set + +function setparms(resid) { + alert('Called setparms for '+resid); +} + // -------------------------------------------------------------- Undo function function undo() { @@ -2422,6 +2490,8 @@ function togglemode() { function main() { if (mainrun==0) { + srchopen(); + srchclose(); infopen(); infoclear(); load(); @@ -2431,12 +2501,15 @@ function main() { } -// ------------------------------------------------------------- Save on leave? +// ---------------------------------------------------------- Close the window? function leave() { if (!inf.closed) { inf.close(); } + if (srch && !srch.closed) { + srchclose(); + } }