--- rat/client/Attic/code.html 2002/05/11 01:30:28 1.52 +++ rat/client/Attic/code.html 2002/11/03 19:07:18 1.61 @@ -4,7 +4,7 @@ The LearningOnline Network Resource Assembly Tool // -// $Id: code.html,v 1.52 2002/05/11 01:30:28 www Exp $ +// $Id: code.html,v 1.61 2002/11/03 19:07:18 www Exp $ // // Copyright Michigan State University Board of Trustees // @@ -118,6 +118,12 @@ var idxflag=-1; // 1 means currently ope // -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) @@ -1576,6 +1582,10 @@ function idxclear() { idx.document.clear(); } +// --------------------------------------------------------- Clears copy window +function copydxclear() { + copydx.document.clear(); +} // ------------------------------------------------------- Clears search window function srchclear() { srch.document.clear(); @@ -1594,6 +1604,14 @@ function idxclose() { } } +// --------------------------------------------------------- Closes copy window +function copydxclose() { + if (copydx && !copydx.closed) { + copydxflag=0; + copydx.close(); + } +} + // ------------------------------------------------------- Closes search window function srchclose() { if (srch && !srch.closed) { @@ -1618,6 +1636,48 @@ function idxopen(mode) { idx=open("/res/?launch=1&mode=rat&catalogmode="+mode,"idxout",options); idx.focus(); } +// ------------------------------------------------- Open browser to select map + var editbrowser; + function openbrowser(formname,elementname,only,omit) { + var url = '/res/?'; + if (editbrowser == null) { + url += 'launch=1&'; + } + url += 'catalogmode=interactive&'; + url += 'mode=edit&'; + url += 'form=' + formname + '&'; + if (only != null) { + url += 'only=' + only + '&'; + } + if (omit != null) { + url += 'omit=' + omit + '&'; + } + url += 'element=' + elementname + ''; + var title = 'Browser'; + var options = 'scrollbars=1,resizable=1,menubar=0'; + options += ',width=700,height=600'; + editbrowser = copydx.open(url,title,options,'1'); + editbrowser.focus(); + } +// ----------------------------------------------------------- Open copy window +function copydxopen(mode) { + var options="scrollbars=1,resizable=1,menubar=0"; + copydxmode=mode; + copydxflag=1; + copydx=open("",'copydxout',options); + copydx.document.clear(''); + copydx.document.writeln( + '

Copy from Map

'+ + '
'+ + '
'); + + copydx.document.writeln(''); + copydx.focus(); +} // --------------------------------------------------------- Open search window function srchopen(mode) { @@ -1649,6 +1709,14 @@ function idxcheck(mode) { idx.focus(); } +// -------------------------------------------------------- Do idx status check +function copydxcheck(mode) { + if (!copydx || copydx.closed || copydxmode!=mode) { + copydxopen(mode); + } + copydx.focus(); +} + // ---------------------------------------------------- Handles "click to edit" function handler(infostr) { var k; @@ -1735,7 +1803,7 @@ function handler(infostr) { inf.document.write( '
'); ++escape(data2[0])+'">'); inf.document.write('' +'
Title:' +'
URL:' +'
External:
- - - - - - - - - - - - + + + + + + + + + + + + +
Toggle display Zoom out Zoom in Condense Straighten Revert Undo Redo Group search Group import Save map Save map and layout Toggle displayZoom outZoom inCondenseStraightenRevertUndoRedoSearchImportCopySave mapSave map and layout