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

Evergreen Git git at git.evergreen-ils.org
Mon Apr 9 10:15:24 EDT 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  cc51f5424ba01e562b4fa0afaa4e36954e91642c (commit)
      from  486444681a4543d9f61e11c2564b0bb392762d7f (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 cc51f5424ba01e562b4fa0afaa4e36954e91642c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Apr 3 15:14:35 2012 -0400

    Org unit custom tree sort repairs
    
    Repairs a problem with detecting and storing the sort order of sibling
    nodes within custom trees.  The original problem was the result of
    comparing parent nodes for non-siblings because of a depth-first tree
    traversal.  Now we process siblings in level-order before processing
    child nodes.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js b/Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js
index 695a9c4..909de62 100644
--- a/Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js
+++ b/Open-ILS/web/js/ui/default/conify/global/actor/org_unit_custom_tree.js
@@ -169,9 +169,12 @@ function applyChanges2() {
     var prevTn;
     var progress = 0;
 
+    // flatten child nodes into a level-order (by parent) list
+    var nodeList = [magicTree.rootNode];
     function flatten(node) {
-        nodeList.push(node);
-        dojo.forEach(node.getChildren(), flatten);
+        var kids = node.getChildren();
+        nodeList = nodeList.concat(kids);
+        dojo.forEach(kids, flatten);
     }
     flatten(magicTree.rootNode);
 

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

Summary of changes:
 .../conify/global/actor/org_unit_custom_tree.js    |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list