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);
}
}
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);
}
}
}
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;
}
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;
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;
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;
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]);