Build and flatten a tree, correcting a sorting issue in some OU dropdowns.
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 19:53:02 +0000 (19:53 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 19:53:02 +0000 (19:53 +0000)
commit59f382ed5c06843bb09dcccf5ad4da1fbad8df2a
tree296aaa45baee7c879cf4da790c80c27776e6353b
parent86521b677228a02c353dc66628d990647e84ea9b
Build and flatten a tree, correcting a sorting issue in some OU dropdowns.

The previous code assumed that work org units would be delivered in hierarchical order, but alas, they are not. Thus, we build the hierarchy and then flatten it, sorting at each level.
This will be non-fast with many work OUs, but the common case is a small set, which is not painful.

Further improvement is warranted when the above proves false.

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@19210 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/xul/staff_client/server/admin/org_unit_settings.js