[open-ils-commits] r15819 - trunk/Open-ILS/web/js/dojo/fieldmapper (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 12 00:03:04 EST 2010


Author: erickson
Date: 2010-03-12 00:03:01 -0500 (Fri, 12 Mar 2010)
New Revision: 15819

Modified:
   trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
Log:
added id version of org descendent list function

Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js	2010-03-12 05:03:00 UTC (rev 15818)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js	2010-03-12 05:03:01 UTC (rev 15819)
@@ -205,11 +205,15 @@
 
     /** Given an org id, returns an array of org units including
      * the org for the ID provided and all descendant orgs */
-    fieldmapper.aou.descendantNodeList = function(orgId) {
+    fieldmapper.aou.descendantNodeList = function(orgId, asId) {
         var list = [];
         function addNode(node) {
             if(!node) return;
-            list.push(node);
+            if(asId) {
+                list.push(node.id());
+            } else {
+                list.push(node);
+            }
             var children = node.children();
             if(children) {
                 for(var i = 0; i < children.length; i++) 



More information about the open-ils-commits mailing list