Authored by Remington Steed
This commit fixes the sort order in IE, Google Chrome of the
org unit's when choosing a search depth.
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
var tree = new SlimTree(node,'orgTreeSelector');
orgTreeSelector = tree;
var orgHiding = checkOrgHiding();
- for( var i in orgArraySearcher ) {
- var node = orgArraySearcher[i];
+ for (var i = 0; i < orgArraySearcherOrder.length; i++) {
+ var node = orgArraySearcher[orgArraySearcherOrder[i]];
if( node == null ) continue;
if(!isXUL() && !isTrue(node.opac_visible())) continue;
if (orgHiding) {
}
var orgArraySearcher = {};
+var orgArraySearcherOrder = [];
var globalOrgTree;
for (var i = 0; i < _l.length; i++) {
var x = new aou();
x.ou_type(_l[i][1]);
x.parent_ou(_l[i][2]);
x.name(_l[i][3]);
- x.opac_visible(_l[i][4]);
- x.shortname(_l[i][5]);
+ x.opac_visible(_l[i][4]);
+ x.shortname(_l[i][5]);
orgArraySearcher[x.id()] = x;
+ orgArraySearcherOrder.push(x.id());
}
-for (var i in orgArraySearcher) {
- var x = orgArraySearcher[i];
+for (var i = 0; i < orgArraySearcherOrder.length; i++) {
+ var x = orgArraySearcher[orgArraySearcherOrder[i]];
if (x.parent_ou() == null || x.parent_ou() == '') {
globalOrgTree = x;
continue;