[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 6d4b8f44e7614a37b109570dc7f34017cead3f6e

Evergreen Git git at git.evergreen-ils.org
Fri Aug 19 15:57:02 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_0 has been updated
       via  6d4b8f44e7614a37b109570dc7f34017cead3f6e (commit)
      from  2b9700d77028c941f4f41ac5433eb56dd3c11316 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6d4b8f44e7614a37b109570dc7f34017cead3f6e
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Aug 19 15:50:22 2011 -0400

    Vandelay: repair item attr context org selector
    
    1. Prevents resetting the context selector to the workstation org unit
    each time it's changed.
    
    2. Prevent the unintentional pileup of dojo.connect() events, which
    can lead to exponential growth in the number of server calls to fetch
    import-item-attribute-definitions with each change of the context org
    selector.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js
index 4ca6f8e..fbefe0f 100644
--- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js
+++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js
@@ -1344,23 +1344,30 @@ function buildProfileGrid() {
 /* --- Import Item Attr Grid --------------- */
 
 var itemAttrContextOrg;
+var itemAttrGridFirstTime = true;
 function vlShowImportItemAttrEditor() {
     displayGlobalDiv('vl-item-attr-editor-div');
-    buildImportItemAttrGrid();
 
-    var connect = function() {
-        dojo.connect(itemAttrContextOrgSelector, 'onChange',
-            function() {
-                itemAttrContextOrg = this.attr('value');
-                itemAttrGrid.resetStore();
-                vlShowImportItemAttrEditor();
-            }
-        );
-    };
+    if (itemAttrGridFirstTime) {
 
-    new openils.User().buildPermOrgSelector(
-        'ADMIN_IMPORT_ITEM_ATTR_DEF', 
-            itemAttrContextOrgSelector, null, connect);
+        buildImportItemAttrGrid();
+
+        var connect = function() {
+            dojo.connect(itemAttrContextOrgSelector, 'onChange',
+                function() {
+                    itemAttrContextOrg = this.attr('value');
+                    itemAttrGrid.resetStore();
+                    buildImportItemAttrGrid();
+                }
+            );
+        };
+
+        new openils.User().buildPermOrgSelector(
+            'ADMIN_IMPORT_ITEM_ATTR_DEF', 
+                itemAttrContextOrgSelector, null, connect);
+
+        itemAttrGridFirstTime = false;
+    }
 }
 
 function buildImportItemAttrGrid() {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/vandelay/vandelay.js |   33 ++++++++++++++---------
 1 files changed, 20 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list