display consolidated copy counts on the result page, and hide the ou_type header bar
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Apr 2008 02:28:05 +0000 (02:28 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Apr 2008 02:28:05 +0000 (02:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9241 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/init.js
Open-ILS/web/opac/skin/default/js/result_common.js

index a5463ea..9ad1ed8 100644 (file)
@@ -50,6 +50,7 @@ function init() {
        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()));
 }
 
index c400664..b7a210d 100644 (file)
@@ -633,7 +633,7 @@ function resultAddCopyCounts(rec, pagePosition) {
 
        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 @@ function resultHandleCopyCounts(r) {
 /* 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);