[open-ils-commits] r17202 - in branches/seials-integration/Open-ILS/xul/staff_client: chrome/content/cat server/serial (dbwells)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Aug 12 17:39:17 EDT 2010


Author: dbwells
Date: 2010-08-12 17:39:11 -0400 (Thu, 12 Aug 2010)
New Revision: 17202

Modified:
   branches/seials-integration/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   branches/seials-integration/Open-ILS/xul/staff_client/server/serial/sdist_editor.js
Log:
bug fix for incorrect sdist editor and opac view interaction


Modified: branches/seials-integration/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- branches/seials-integration/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-08-12 19:49:53 UTC (rev 17201)
+++ branches/seials-integration/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-08-12 21:39:11 UTC (rev 17202)
@@ -321,9 +321,8 @@
                 win.attachEvt("rdetail", "MFHDDrawn",
                     function() {
                         if (win.mfhdDetails && win.mfhdDetails.length > 0) {
-                            g.data.mfhd = {};
-                            g.data.mfhd.details = win.mfhdDetails;
-                            g.data.stash('mfhd');
+                            g.mfhd = {};
+                            g.mfhd.details = win.mfhdDetails;
                             mfhd_edit_menu.disabled = false;
                             mfhd_delete_menu.disabled = false;
                             for (var i = 0; i < win.mfhdDetails.length; i++) {

Modified: branches/seials-integration/Open-ILS/xul/staff_client/server/serial/sdist_editor.js
===================================================================
--- branches/seials-integration/Open-ILS/xul/staff_client/server/serial/sdist_editor.js	2010-08-12 19:49:53 UTC (rev 17201)
+++ branches/seials-integration/Open-ILS/xul/staff_client/server/serial/sdist_editor.js	2010-08-12 21:39:11 UTC (rev 17202)
@@ -21,19 +21,22 @@
     this.editor_values = {};
 
     // setup sre arrays
-    var mfhd_details = this.data.mfhd.details;
     this.sre_id_map = {};
     this.sres_ou_map = {};
-    for (var i = 0; i < mfhd_details.length; i++) {
-        var mfhd_detail = mfhd_details[i];
-        mfhd_detail.label = mfhd_detail.label + ' (' + (mfhd_detail.entryNum + 1) + ')';
-        var sre_id = mfhd_detail.id;
-        var org_unit_id = mfhd_detail.owning_lib;
-        this.sre_id_map[sre_id] = mfhd_detail;
-        if (!this.sres_ou_map[org_unit_id]) {
-            this.sres_ou_map[org_unit_id] = [];
+    var parent_g = window.parent.g;
+    if (parent_g.mfhd) {
+        var mfhd_details = parent_g.mfhd.details;
+        for (var i = 0; i < mfhd_details.length; i++) {
+            var mfhd_detail = mfhd_details[i];
+            mfhd_detail.label = mfhd_detail.label + ' (' + (mfhd_detail.entryNum + 1) + ')';
+            var sre_id = mfhd_detail.id;
+            var org_unit_id = mfhd_detail.owning_lib;
+            this.sre_id_map[sre_id] = mfhd_detail;
+            if (!this.sres_ou_map[org_unit_id]) {
+                this.sres_ou_map[org_unit_id] = [];
+            }
+            this.sres_ou_map[org_unit_id].push(mfhd_detail);
         }
-        this.sres_ou_map[org_unit_id].push(mfhd_detail);
     }
 };
 



More information about the open-ils-commits mailing list