--- rat/client/Attic/code.html 2001/03/12 15:47:46 1.18 +++ rat/client/Attic/code.html 2001/06/25 21:43:49 1.36 @@ -11,6 +11,11 @@ Resource Assembly Tool 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,03/03,03/05 Gerd Kortemeyer with Scott Harrison +March/April 01 Scott Harrison +04/20 Gerd Kortemeyer +04/30 Scott Harrison +05/31 Scott Harrison +06/11,06/25 Gerd Kortemeyer --> @@ -73,6 +78,25 @@ 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 parm; +var parmflag=-1; // 1 means currently open + // 0 means closed (but has been open) + // -1 means never yet opened/defined + +function testfunction() { + inf.document.forms.resinfo.elements.t.value="ABC"; +} // ------------------------------------------------ Insert a row into the table @@ -1282,6 +1306,15 @@ function infoclear() { } inf.document.writeln(''); inf.document.close(); + if (srchflag==1) { + srchclose(); + } + if (idxflag==1) { + idxclose(); + } + if (parmflag==1) { + parmclose(); + } parent.top.focus(); parent.mapout.focus(); notclear=1; @@ -1457,60 +1490,69 @@ function insertcondlink(cid,lnr) { +// ------------------------------------------------------ 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; + idx.close(); + } +} + // ------------------------------------------------------- Closes search window function srchclose() { - srch.close(); + if (srch && !srch.closed) { + srchflag=0; + srch.close(); + } +} + +// ------------------------------------------------------- Closes search window + +function parmclose() { + if (parm && !parm.closed) { + parmflag=0; + parm.close(); + } +} + +// -------------------------------------------------------- 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.focus(); } // --------------------------------------------------------- Open search window -function srchopen() { +function srchopen(mode) { var options="scrollbars=1,resizable=1,menubar=0"; - srch=open("/adm/searchcat","srchout",options); - return; - srchclear(); - srch.document.writeln( - '
'+ - ''+ - ''+ - ''+ - '
Resource Library Search
'+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
title
author
subject
notes
abstract
mime
language
creationdate
lastrevisiondate
owner
copyright
'+ - ''+ - '
'); + srchmode=mode; + srchflag=1; + srch=open("/adm/searchcat?catalogmode=interactive","srchout",options); + srch.focus(); } // -------------------------------------------- Interface function to searching @@ -1521,10 +1563,20 @@ function search() { // ------------------------------------------------------- Do srch status check -function srchcheck() { - if (srch.closed) { +function srchcheck(mode) { + if (!srch || srch.closed || srchmode!=mode) { srchopen(); } + srch.focus(); +} + +// -------------------------------------------------------- Do idx status check + +function idxcheck(mode) { + if (!idx || idx.closed || idxmode!=mode) { + idxopen(mode); + } + idx.focus(); } // ---------------------------------------------------- Handles "click to edit" @@ -1622,7 +1674,10 @@ function handler(infostr) { +'' +'External:Search' + inf.document.write('>' + +'Browse ' + +'Search' +'' +'Revert Undo Redo +Group Search +Group Import Store