details. No 8080. chain_exec
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Aug 2005 04:12:14 +0000 (04:12 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 29 Aug 2005 04:12:14 +0000 (04:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1756 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/Makefile
Evergreen/staff_client/chrome/content/evergreen/cat/details.xul [new file with mode: 0644]
Evergreen/staff_client/chrome/content/evergreen/opac/opac.js
Evergreen/staff_client/chrome/content/evergreen/util/util.js

index b53e9df..c693e04 100644 (file)
@@ -3,9 +3,9 @@ PACKAGE=Evergreen
 DESCRIPTION=Evergreen Staff Client 
 BUILD=2005072719
 
-RETRIEVE_FIELDMAPPER=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/util/fieldmapper.js
-RETRIEVE_FM_ALL=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/fmall.js
-RETRIEVE_ORG_TREE=wget -N http://spacely.georgialibraries.org:8080/opac/common/js/OrgTree.js
+RETRIEVE_FIELDMAPPER=wget -N http://spacely.georgialibraries.org/opac/common/js/util/fieldmapper.js
+RETRIEVE_FM_ALL=wget -N http://spacely.georgialibraries.org/opac/common/js/fmall.js
+RETRIEVE_ORG_TREE=wget -N http://spacely.georgialibraries.org/opac/common/js/OrgTree.js
 RETRIEVE_CLIENT_CONFIG=cp ../../../../../../OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml .
 
 all: build package
diff --git a/Evergreen/staff_client/chrome/content/evergreen/cat/details.xul b/Evergreen/staff_client/chrome/content/evergreen/cat/details.xul
new file mode 100644 (file)
index 0000000..01adef5
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Cataloger's Search Result Screen -->
+
+<!-- Stylesheets -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://evergreen/skin/evergreen.css" type="text/css"?>
+<?xml-stylesheet href="chrome://evergreen/skin/cat.css" type="text/css"?>
+
+<!-- Localization -->
+<!DOCTYPE window SYSTEM "chrome://evergreen/locale/cat.dtd">
+
+<window id="details_win" title="Record Details" 
+       orient="vertical" style="overflow: scroll" width="800" height="500"
+       onload="my_init();"
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <!-- Overlays for this XUL file -->
+       <?xul-overlay href="chrome://evergreen/content/util/util_overlay.xul"?>
+
+       <script>
+       <![CDATA[
+               var myPackageDir = "evergreen";
+
+               function my_init() {
+
+                       chain_exec(
+                               my_init_spawn_marc_view,
+                               my_init_spawn_marc_editor,
+                               my_init_spawn_copy_browser,
+                               my_init_spawn_opac_view
+                       );
+
+               }
+
+               function my_init_spawn_marc_view() {
+                       var html = user_request(
+                               "open-ils.search",
+                               "open-ils.search.biblio.record.html",
+                               [ find_this_id ]
+                       )[0];
+                       dump('html = ' + html + '\n');
+                       spawn_interface(
+                               document, 'replace_browser', 'marc_view',
+                               'data:text/html,' + html,
+                               'MARC View2', {}
+                       );
+               }
+
+               function my_init_spawn_marc_editor() {
+                       spawn_marc_editor(
+                               document, 'replace_iframe', 'marc_edit', {
+                                       'find_this_id' : find_this_id
+                               }
+                       ).find_this_id = find_this_id;
+               }
+
+               function my_init_spawn_copy_browser() {
+                       spawn_copy_browser(
+                               document, 'replace_iframe', 'copy_browser', {
+                                       'find_this_id' : find_this_id
+                               }
+                       ).find_this_id = find_this_id;
+               }
+
+               function my_init_spawn_opac_view() {
+               }
+       ]]>
+       </script>
+
+       <tabbox flex="1">
+               <tabs>
+                       <tab label="MARC View"/>
+                       <tab label="MARC Edit"/>
+                       <tab label="Copy Browser"/>
+                       <tab label="OPAC View"/>
+               </tabs>
+               <tabpanels flex="1">
+                       <tabpanel id="marc_view"/>
+                       <tabpanel id="marc_edit"/>
+                       <tabpanel id="copy_browser"/>
+                       <tabpanel id="opac_view"/>
+               </tabpanels>
+       </tabbox>
+
+</window>
+
index bc09f28..75d1c20 100644 (file)
@@ -1,6 +1,6 @@
 sdump('D_OPAC','Loading opac.js\n');
 
-var OPAC_URL = "http://spacely.georgialibraries.org:8080/";
+var OPAC_URL = "http://spacely.georgialibraries.org/";
 
 /* listen for page changes */
 
index 0a9d011..52754e6 100644 (file)
@@ -5,6 +5,26 @@ var consider_Timeout_default = false;
 
 function a_get( obj, i ) { return obj[i]; } // for use in closures inside loops
 
+// This executes a series of functions, but tries to give other events/functions a chance to
+// execute between each one.
+function chain_exec() {
+       sdump('D_UTIL',arg_dump(arguments));
+       var args = [];
+       for (var i = 0; i < arguments.length; i++) {
+               var arg = arguments[i];
+               if (typeof(arg)=='function') args.push( arg );
+               else for (var j = 0; j < arg.length; j++) {
+                       if (typeof(arg[j])=='function') args.push( arg[j] );
+               }
+       }
+       if (args.length > 0) setTimeout(
+               function() {
+                       args[0]();
+                       if (args.length > 1 ) chain_exec( args.slice(1) );
+               }, 0
+       );
+}
+
 function consider_Timeout( f, t, b) {
        sdump('D_TIMEOUT', arg_dump(arguments,{0:true,1:true,2:true}));
        if (b) {