[open-ils-commits] [GIT] Evergreen ILS branch master updated. bd0057b49bd7179bf71962eff64ce0029e1067e6

Evergreen Git git at git.evergreen-ils.org
Tue Feb 14 12:41:15 EST 2012


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, master has been updated
       via  bd0057b49bd7179bf71962eff64ce0029e1067e6 (commit)
      from  dc6c8c93f4edfc064ccecea7c8e5196180e3aa6d (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 bd0057b49bd7179bf71962eff64ce0029e1067e6
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Feb 14 11:18:27 2012 -0500

    Vandelay record match sets: fix bug loading some trees
    
    Reported to me by Bill Erickson.  The Vandelay Record Match Sets
    interface was failing to load some simple trees of match set points.
    
    Example: http://pastesite.com/31643
    
    The proximate symptom was this error message:
    
        Error: dojo.data.ItemFileReadStore: Invalid item argument.
        Source File: http://dev198.esilibrary.com/js/dojo/dojo/dojo.js
        Line: 119
    
    but the root cause was a problem in dojoize_match_set_tree(), which
    was failing to generate unique identifiers for each item in the data
    store it's responsible for generating.
    
    Since that function is only ever used to deal with trees where all the
    nodes come from the database and have actual IDs, that function now uses
    the database IDs as is rather than attempting to generate new ones.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js b/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js
index 87656a3..1de99e4 100644
--- a/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js
+++ b/Open-ILS/web/js/ui/default/conify/global/vandelay/match_set.js
@@ -418,20 +418,20 @@ function new_match_set_tree() {
  * ],
  *
  */
-function dojoize_match_set_tree(point, refgen) {
+function dojoize_match_set_tree(point, depth) {
     var root = false;
-    if (!refgen) {
+    if (!depth) {
         if (!point) {
             return new_match_set_tree();
         }
-        refgen = 0;
+        depth = 0;
         root = true;
     }
 
     var bathwater = point.children();
     point.children([]);
     var item = {
-        "id": (root ? "root" : refgen),
+        "id": (root ? "root" : point.id()),
         "name": render_vmsp_label(point),
         "match_point": point.clone(),
         "children": []
@@ -443,9 +443,9 @@ function dojoize_match_set_tree(point, refgen) {
     if (point.children()) {
         for (var i = 0; i < point.children().length; i++) {
             var child = point.children()[i];
-            item.children.push({"_reference": ++refgen});
+            item.children.push({"_reference": child.id()});
             results = results.concat(
-                dojoize_match_set_tree(child, refgen)
+                dojoize_match_set_tree(child, ++depth)
             );
         }
     }

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

Summary of changes:
 .../ui/default/conify/global/vandelay/match_set.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list