[open-ils-commits] r7581 -
branches/rel_1_2/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 25 10:45:12 EDT 2007
Author: erickson
Date: 2007-07-25 10:44:12 -0400 (Wed, 25 Jul 2007)
New Revision: 7581
Modified:
branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
backporting callnumber sort fix: svn merge -r7579:7580 svn://svn.open-ils.org/ILS/trunk
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 2007-07-25 14:41:50 UTC (rev 7580)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/rdetail.js 2007-07-25 14:44:12 UTC (rev 7581)
@@ -572,14 +572,22 @@
if(rowNode.getAttribute("used")) {
- if( rowNode.nextSibling )
- rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), rowNode.nextSibling);
- else
+ if( rowNode.nextSibling ) {
+ 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) ) {
+ sib = sib.nextSibling;
+ }
+ rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+ } else {
rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+ }
+
var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
n.appendChild(text(thisOrg.name()));
n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1) * 9) + "px;");
- rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr); //
+ rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr);
} else {
rowNode.setAttribute("used", "1");
More information about the open-ils-commits
mailing list