brief display data. misc.
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Aug 2005 03:55:33 +0000 (03:55 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Aug 2005 03:55:33 +0000 (03:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1761 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

diff --git a/Evergreen/staff_client/chrome/content/evergreen/cat/brief.xul b/Evergreen/staff_client/chrome/content/evergreen/cat/brief.xul
new file mode 100644 (file)
index 0000000..387f768
--- /dev/null
@@ -0,0 +1,46 @@
+<?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="brief_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() {
+                       user_request(
+                               'open-ils.cat',
+                               'open-ils.cat.biblio.record.metadata.retrieve',
+                               [ find_this_id ],
+                               function (req) {
+                                       var meta = req.getResultObject()[0];
+                                       dump('META = ' + js2JSON(meta) + '\n');
+                               }
+                       );
+               }
+
+       ]]>
+       </script>
+
+       <groupbox flex="1">
+               <caption label="Record Details"/>
+
+       </groupbox>
+
+</window>
+
index 01adef5..4509631 100644 (file)
                function my_init() {
 
                        chain_exec(
+                               my_init_spawn_brief_view,
                                my_init_spawn_marc_view,
-                               my_init_spawn_marc_editor,
                                my_init_spawn_copy_browser,
+                               my_init_spawn_marc_editor,
                                my_init_spawn_opac_view
                        );
 
                }
 
+               function my_init_spawn_brief_view() {
+                       spawn_brief_view(
+                               document, 'replace_iframe', 'brief_view', {
+                                       'find_this_id' : find_this_id
+                               }
+                       ).find_this_id = find_this_id;
+               }
+
                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,
                }
 
                function my_init_spawn_opac_view() {
+                       dump('trying to spawn: ' + params.opac_url + '\n');
+                       spawn_interface(
+                               document, 'replace_browser', 'opac_view',
+                               params.opac_url, '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>
+       <vbox flex="1">
+               <hbox id="brief_view"/>
+               <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>
+       </vbox>
 
 </window>
 
index 13787a2..830fd8f 100644 (file)
@@ -17,6 +17,7 @@ function my_init() {
 
        if (! params.import_tree ) {
                tree = retrieve_record( find_this_id );
+               /*
                meta = retrieve_meta_record( find_this_id );
                document.getElementById('meta_create_date').setAttribute('value',
                        meta.create_date().split('.')[0]        
@@ -41,17 +42,19 @@ function my_init() {
                                text
                        );
                }
+               */
        } else {
                tree = params.import_tree;
-               if (tree.name() == 'collection') { 
-                       tree = find_list(
-                               tree.children(),
-                               function (obj) {
-                                       return (obj.name() == 'record');
-                               }
-                       ); 
-               }
        }
+       if (tree.name() == 'collection') { 
+               tree = find_list(
+                       tree.children(),
+                       function (obj) {
+                               return (obj.name() == 'record');
+                       }
+               ); 
+       }
+
        //mw.sdump('D_CAT','Retrieved: ' + js2JSON(tree) + '\n');
        //mw.sdump('D_CAT','Retrieved: ' + js2JSON(meta) + '\n');
        build_grid( 
index 6e24f7a..6b2427f 100644 (file)
@@ -69,13 +69,6 @@ function set_opac_vars(p) {
        p.opac_iframe.contentWindow.xulG = mw.G;
        p.opac_iframe.contentWindow.attachEvt("rresult", "recordDrawn", 
                function(id,node){opac_make_details_page(p,id,node)});
-       dump('p.opac_iframe = ' + p.opac_iframe + '\n');
-       dump('p.opac_iframe.contentWindow = ' + p.opac_iframe.contentWindow + '\n');
-       dump('p.opac_iframe.contentWindow = ' + p.opac_iframe.contentWindow + '\n');
-       dump('p.opac_iframe.contentWindow.G = ' + p.opac_iframe.contentWindow.G + '\n');
-       dump('p.opac_iframe.contentWindow.G.evt = ' + p.opac_iframe.contentWindow.G.evt + '\n');
-       dump('p.opac_iframe.contentWindow.G.evt.rresult = ' + p.opac_iframe.contentWindow.G.evt.rresult + '\n');
-       dump('p.opac_iframe.contentWindow.G.evt.rresult.recordDrawn = ' + p.opac_iframe.contentWindow.G.evt.rresult.recordDrawn + '\n');
        p.opac_iframe.removeProgressListener(p.opac_progressListener);
        p.opac_iframe.addProgressListener(p.opac_progressListener, 
                Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT );
@@ -88,7 +81,7 @@ function opac_make_details_page(p, id, node) {
        var f = function(ev) {
                spawn_record_details(
                        p.w.app_shell, 'new_tab', 'main_tabbox', {
-                               'find_this_id' : id
+                               'find_this_id' : id, 'opac_url' : node.getAttribute('href')
                        }
                ).find_this_id = id;
                ev.preventDefault();
index ebdd1c3..c2114ca 100644 (file)
@@ -151,6 +151,11 @@ function spawn_copy_browser(d,placement,place,passthru_params,clone) {
        return spawn_interface(d,placement,place,chrome,getString('copy_browser_interface_label'),passthru_params,clone);
 }
 
+function spawn_brief_view(d,placement,place,passthru_params,clone) {
+       var chrome = 'chrome://evergreen/content/cat/brief.xul';
+       return spawn_interface(d,placement,place,chrome,'BRIEF VIEW',passthru_params,clone);
+}
+
 function spawn_marc_editor(d,placement,place,passthru_params,clone) {
        var chrome = 'chrome://evergreen/content/cat/marc.xul';
        return spawn_interface(d,placement,place,chrome,getString('marc_editor_interface_label'),passthru_params,clone);