--- rat/client/Attic/code.html 2001/04/30 17:01:06 1.29 +++ rat/client/Attic/code.html 2001/06/02 17:19:53 1.33 @@ -14,6 +14,7 @@ Resource Assembly Tool March/April 01 Scott Harrison 04/20 Gerd Kortemeyer 04/30 Scott Harrison +05/31 Scott Harrison --> @@ -79,6 +80,13 @@ 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=''; function testfunction() { inf.document.forms.resinfo.elements.t.value="ABC"; @@ -1295,6 +1303,9 @@ function infoclear() { if (srchflag==1) { srchclose(); } + if (idxflag==1) { + idxclose(); + } parent.top.focus(); parent.mapout.focus(); notclear=1; @@ -1470,12 +1481,27 @@ function insertcondlink(cid,lnr) { +// ------------------------------------------------------ Clears indexer window + +function idxclear() { + idx.document.clear(); +} + // ------------------------------------------------------- Clears search window function srchclear() { srch.document.clear(); } +// ------------------------------------------------------ Closes indexer window + +function idxclose() { + if (idx && !idx.closed) { + idxflag=0; + idx.close(); + } +} + // ------------------------------------------------------- Closes search window function srchclose() { @@ -1485,10 +1511,21 @@ function srchclose() { } } +// -------------------------------------------------------- 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"; + srchmode=mode; srchflag=1; srch=open("/adm/searchcat?catalogmode=interactive","srchout",options); srch.focus(); @@ -1502,13 +1539,22 @@ function search() { // ------------------------------------------------------- Do srch status check -function srchcheck() { - if (!srch || 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" function handler(infostr) { @@ -1604,7 +1650,10 @@ function handler(infostr) { +'' +'External:Search' + inf.document.write('>' + +'Browse ' + +'Search' +'' +' @@ -2535,6 +2594,8 @@ function leave() { Revert Undo Redo +Group Search +Group Import Store