[open-ils-commits] r8511 -
branches/rel_1_2/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 28 10:35:32 EST 2008
Author: erickson
Date: 2008-01-28 10:08:20 -0500 (Mon, 28 Jan 2008)
New Revision: 8511
Modified:
branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
protecting against edge case where we run off the end of the org table before finding a place to insert the callnumber row
Modified: branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js 2008-01-28 15:04:43 UTC (rev 8510)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js 2008-01-28 15:08:20 UTC (rev 8511)
@@ -591,10 +591,13 @@
sib = rowNode.nextSibling;
o ='cp_info_'+thisOrg.id()+'_';
/* push the new row on as the last row for this org unit */
- while( sib.id.match(o) ) {
+ while( sib && sib.id.match(o) ) {
sib = sib.nextSibling;
}
- rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+ if(sib)
+ rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+ else
+ rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
} else {
rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
}
More information about the open-ils-commits
mailing list