z3950 -> marc editor
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 19 Feb 2006 19:14:42 +0000 (19:14 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 19 Feb 2006 19:14:42 +0000 (19:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3122 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/legacy/_marc.xul
Open-ILS/xul/staff_client/server/cat/z3950.js

index b0bdb96..ec2003e 100644 (file)
 
                                find_this_id = g.cgi.param('docid');
 
+                               if (typeof window.xulG == 'object' && window.xulG.import_tree) {
+                                       params.import_tree = window.xulG.import_tree;
+                               }
+
                                JSAN.use('util.network');
                                g.network = new util.network();
 
index cc4d726..07f74c7 100644 (file)
@@ -49,6 +49,8 @@ cat.z3950.prototype = {
                                                        function(o) { return o.getAttribute('retrieve_id'); }
                                                );
                                                obj.sdump('D_TRACE','cat/z3950: selection list = ' + js2JSON(list) );
+                                               obj.controller.view.import.disabled = false;
+                                               obj.controller.setAttribute('retrieve_id',list[0]);
                                        },
                                }
                        );
@@ -104,6 +106,11 @@ cat.z3950.prototype = {
                                                'import' : [
                                                        ['command'],
                                                        function() {
+                                                               obj.spawn_marc_editor(
+                                                                       obj.results.records[
+                                                                               obj.controller.view.import.getAttribute('retrieve_id')
+                                                                       ].brn
+                                                               );
                                                        },
                                                ],
                                                'asc_search' : [
@@ -312,7 +319,7 @@ cat.z3950.prototype = {
                                document.createTextNode( results.records.length + (results.records.length == 1 ? ' result' : ' results') + ' retrieved. ')
                        );
                        obj.results = results;
-                       obj.list.clear(); 
+                       obj.list.clear(); obj.controller.view.import.disabled = true;
                        for (var i = 0; i < obj.results.records.length; i++) {
                                obj.list.append(
                                        {
@@ -332,6 +339,11 @@ cat.z3950.prototype = {
                }
        },
 
+       'spawn_marc_editor' : function(my_brn) {
+               var obj = this;
+               xulG.new_tab(xulG.url_prefix(urls.XUL_MARC_EDIT) + '?session=' + window.escape(obj.session), {}, { 'import_tree' : my_brn } );
+       },
+
 }
 
 dump('exiting cat.z3950.js\n');