[open-ils-commits] [GIT] Evergreen ILS branch master updated. 6508510e74b62a78eb3b29ac7ea98741e522b91a
Evergreen Git
git at git.evergreen-ils.org
Thu Mar 29 15:10:47 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 6508510e74b62a78eb3b29ac7ea98741e522b91a (commit)
from 65f9f8c408bd554beb139f3d5b6ee85bb06372c9 (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 6508510e74b62a78eb3b29ac7ea98741e522b91a
Author: Michael Peters <mrpeters at library.in.gov>
Date: Thu Mar 29 14:59:20 2012 -0400
LP#520632 Fix for-loop over orgArraySearcher to preserve order
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 at calvin.edu>
Signed-off-by: Michael Peters <mrpeters at library.in.gov>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js
index aae4746..78557b6 100644
--- a/Open-ILS/web/opac/common/js/opac_utils.js
+++ b/Open-ILS/web/opac/common/js/opac_utils.js
@@ -881,8 +881,8 @@ function buildOrgSelector(node) {
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) {
diff --git a/Open-ILS/web/opac/common/js/org_utils.js b/Open-ILS/web/opac/common/js/org_utils.js
index 091d277..3a12a49 100644
--- a/Open-ILS/web/opac/common/js/org_utils.js
+++ b/Open-ILS/web/opac/common/js/org_utils.js
@@ -128,6 +128,7 @@ function orgIsMineFromSet(meList, org) {
}
var orgArraySearcher = {};
+var orgArraySearcherOrder = [];
var globalOrgTree;
for (var i = 0; i < _l.length; i++) {
var x = new aou();
@@ -135,12 +136,13 @@ for (var i = 0; i < _l.length; i++) {
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;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/opac/common/js/opac_utils.js | 4 ++--
Open-ILS/web/opac/common/js/org_utils.js | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list