[open-ils-commits] r9241 - in trunk/Open-ILS/web/opac: common/js skin/default/js

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Apr 6 23:05:01 EDT 2008


Author: miker
Date: 2008-04-06 22:28:05 -0400 (Sun, 06 Apr 2008)
New Revision: 9241

Modified:
   trunk/Open-ILS/web/opac/common/js/init.js
   trunk/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
display consolidated copy counts on the result page, and hide the ou_type header bar

Modified: trunk/Open-ILS/web/opac/common/js/init.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/init.js	2008-04-06 13:22:30 UTC (rev 9240)
+++ trunk/Open-ILS/web/opac/common/js/init.js	2008-04-07 02:28:05 UTC (rev 9241)
@@ -50,6 +50,7 @@
 	var loc = findOrgLasso(getLasso());
 	if (!loc) loc = findOrgUnit(getLocation());
 
+	if (getLasso()) G.ui.common.now_searching.appendChild(text('Search group: '));
 	G.ui.common.now_searching.appendChild(text(loc.name()));
 }
 

Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2008-04-06 13:22:30 UTC (rev 9240)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js	2008-04-07 02:28:05 UTC (rev 9241)
@@ -633,7 +633,7 @@
 
 	var cchead = null;
 	var ccheadcell = null;
-	if(!resultCCHeaderApplied) {
+	if(!resultCCHeaderApplied && !getLasso()) {
 		ccrow = $('result_thead_row');
 		ccheadcell =  ccrow.removeChild($n(ccrow, "result_thead_ccell"));
 		var t = ccheadcell.cloneNode(true);
@@ -699,6 +699,27 @@
 /* display the collected copy counts */
 function resultDisplayCopyCounts(rec, pagePosition, copy_counts) {
 	if(copy_counts == null || rec == null) return;
+
+	if (getLasso()) {
+		var copy_counts_lasso = {
+			transcendant : null,
+			count : 0,
+			unshadow : 0,
+			available : 0,
+			depth : -1,
+			org_unit : getLasso()
+		};
+
+		for (var i in copy_counts) {
+			copy_counts_lasso.transcendant = copy_counts[i].transcendant;
+			copy_counts_lasso.count += parseInt(copy_counts[i].count);
+			copy_counts_lasso.unshadow += parseInt(copy_counts[i].unshadow);
+			copy_counts_lasso.available += parseInt(copy_counts[i].available);
+		}
+
+		copy_counts = [ copy_counts_lasso ];
+	}
+
 	var i = 0;
 	while(copy_counts[i] != null) {
 		var cell = $("copy_count_cell_" + i +"_" + pagePosition);



More information about the open-ils-commits mailing list