[open-ils-commits] r15523 - trunk/Open-ILS/web/opac/common/js (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 12 12:13:30 EST 2010
Author: miker
Date: 2010-02-12 12:13:27 -0500 (Fri, 12 Feb 2010)
New Revision: 15523
Modified:
trunk/Open-ILS/web/opac/common/js/opac_utils.js
trunk/Open-ILS/web/opac/common/js/org_utils.js
Log:
Addressing https://bugs.launchpad.net/evergreen/+bug/520632
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2010-02-12 17:03:38 UTC (rev 15522)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2010-02-12 17:13:27 UTC (rev 15523)
@@ -1021,7 +1021,7 @@
var kids = org.children();
if (kids) {
for( var c = 0; c < kids.length; c++ )
- buildOrgSel( selector, org.children()[c], offset, namecol);
+ buildOrgSel( selector, kids[c], offset, namecol);
}
}
@@ -1034,7 +1034,7 @@
var kids = org.children();
if (kids) {
for( var c = 0; c < kids.length; c++ )
- buildOrgSel( selector, org.children()[c], offset, namecol);
+ buildOrgSel( selector, kids[c], offset, namecol);
}
}
}
Modified: trunk/Open-ILS/web/opac/common/js/org_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/org_utils.js 2010-02-12 17:03:38 UTC (rev 15522)
+++ trunk/Open-ILS/web/opac/common/js/org_utils.js 2010-02-12 17:13:27 UTC (rev 15523)
@@ -33,7 +33,7 @@
function findOrgTypeFromDepth(depth) {
if( depth == null ) return null;
- for( var type in globalOrgTypes ) {
+ for( var type = 0; type < globalOrgTypes.length; type++ ) {
var t = globalOrgTypes[type];
if( t.depth() == depth ) return t;
}
@@ -43,7 +43,7 @@
the org type object */
function findOrgType(type_id) {
if(typeof type_id == 'object') return type_id;
- for(var type in globalOrgTypes) {
+ for(var type = 0; type < globalOrgTypes.length; type++) {
var t =globalOrgTypes[type];
if( t.id() == type_id || t.id() == parseInt(type_id) )
return t;
@@ -60,7 +60,7 @@
function findOrgLasso(lasso_id) {
if (typeof lasso_id == 'object') return lasso_id;
- for (var i in _lasso) {
+ for (var i = 0; i < _lasso.length; i++) {
if (_lasso[i].id() == lasso_id) return _lasso[i];
}
return null;
@@ -96,8 +96,9 @@
function orgIsMine(me, org) {
if(!me || !org) return false;
if(me.id() == org.id()) return true;
- for( var i in me.children() ) {
- if(orgIsMine(me.children()[i], org))
+ var kids = me.children();
+ for( var i = 0; i < kids.legnth; i++ ) {
+ if(orgIsMine(kids[i], org))
return true;
}
return false;
@@ -114,7 +115,7 @@
var orgArraySearcher = {};
var globalOrgTree;
-for (var i in _l) {
+for (var i = 0; i < _l.length; i++) {
var x = new aou();
x.id(_l[i][0]);
x.ou_type(_l[i][1]);
More information about the open-ils-commits
mailing list