From 333b2571b94e64582a1fdbe679d91c3b0c84a3c5 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 7 Apr 2008 02:28:05 +0000 Subject: [PATCH] display consolidated copy counts on the result page, and hide the ou_type header bar git-svn-id: svn://svn.open-ils.org/ILS/trunk@9241 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/init.js | 1 + .../web/opac/skin/default/js/result_common.js | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/common/js/init.js b/Open-ILS/web/opac/common/js/init.js index a5463ea6a0..9ad1ed8301 100644 --- a/Open-ILS/web/opac/common/js/init.js +++ b/Open-ILS/web/opac/common/js/init.js @@ -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())); } diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index c4006641f6..b7a210d2ea 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -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); -- 2.43.2