[open-ils-commits] r15524 - trunk/Open-ILS/web/opac/skin/default/js (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 12 12:21:46 EST 2010
Author: miker
Date: 2010-02-12 12:21:43 -0500 (Fri, 12 Feb 2010)
New Revision: 15524
Modified:
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Addressing https://bugs.launchpad.net/evergreen/+bug/520632
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-02-12 17:13:27 UTC (rev 15523)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-02-12 17:21:43 UTC (rev 15524)
@@ -393,7 +393,7 @@
// Fill in our unAPI ID, if anyone cares
var abbrs = document.getElementsByTagName('abbr');
var span;
- for (var i = 0; i < abbrs.length; i = i + 1) {
+ for (var i = 0; i < abbrs.length; i++) {
if (abbrs[i].getAttribute('name') == 'unapi') {
span = abbrs[i];
break;
@@ -473,7 +473,7 @@
var index = 3;
doSelectorActions(selector);
- for( var i = 0; i != containers.length; i++ ) {
+ for( var i = 0; i < containers.length; i++ ) {
found = true;
var container = containers[i];
insertSelectorVal( selector, index++, container.name(),
@@ -607,7 +607,7 @@
return;
}
- for( var i in arr ) {
+ for( var i = 0; i < arr.length; i++ ) {
var cn = arr[i];
var opt = new Option(cn);
select.options[index++] = opt;
@@ -673,7 +673,7 @@
var template = par.removeChild($('rdetail_review_template'));
if( res && res.length > 0 ) {
unHideMe($('rdetail_reviews_link'));
- for( var i = 0; i != res.length; i++ ) {
+ for( var i = 0; i < res.length; i++ ) {
var rev = res[i];
if( rev.text && rev.info ) {
var node = template.cloneNode(true);
@@ -716,12 +716,15 @@
if( node ) {
if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
} else {
- for( var i = 0; i < globalOrgTree.children().length; i++ ) {
- var org = findOrgUnit(globalOrgTree.children()[i]);
- if( orgIsMine(org, loc) ) {
- node = org;
- break;
- }
+ var kids = globalOrgTree.children();
+ if (kids) {
+ for( var i = 0; i < kids.length; i++ ) {
+ var org = findOrgUnit(kids[i]);
+ if( orgIsMine(org, loc) ) {
+ node = org;
+ break;
+ }
+ }
}
}
}
@@ -764,8 +767,11 @@
} else { node = globalOrgTree; }
- for( var c in node.children() )
- _rdetailRows(node.children()[c]);
+ var kids = node.children();
+ if (kids) {
+ for( var c = 0; c < kids.length; c++ )
+ _rdetailRows(kids[c]);
+ }
}
function rdetailCNPrint(orgid, cn) {
More information about the open-ils-commits
mailing list