From 72ba633b4dfcb278c3788600d6bda717962059d4 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 12 Mar 2010 05:03:01 +0000 Subject: [PATCH] added id version of org descendent list function git-svn-id: svn://svn.open-ils.org/ILS/trunk@15819 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js b/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js index b2895f50d8..a6c7f63601 100644 --- a/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js +++ b/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js @@ -205,11 +205,15 @@ if(!dojo._hasResource["fieldmapper.OrgUtils"]){ /** 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++) -- 2.11.0