[open-ils-commits] r7580 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 25 10:42:49 EDT 2007
Author: erickson
Date: 2007-07-25 10:41:50 -0400 (Wed, 25 Jul 2007)
New Revision: 7580
Modified:
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
now the OPAC will rely on (and not alter) the server-side sorting of callnumbers
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2007-07-25 14:13:33 UTC (rev 7579)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2007-07-25 14:41:50 UTC (rev 7580)
@@ -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