From ad9ed2d37a16df0495bf68e7d31dfffef18a54c2 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Tue, 3 Apr 2012 10:34:25 -0400 Subject: [PATCH] Hide copy counts for online-only bibs in results Hide copy counts in search results for bibs which appear to be online-only. Signed-off-by: Jeff Godin --- Open-ILS/web/opac/skin/tadlv2/js/rresult.js | 6 +++++- Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml | 2 +- Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/opac/skin/tadlv2/js/rresult.js b/Open-ILS/web/opac/skin/tadlv2/js/rresult.js index 6dccc497ec..c3471a36f2 100644 --- a/Open-ILS/web/opac/skin/tadlv2/js/rresult.js +++ b/Open-ILS/web/opac/skin/tadlv2/js/rresult.js @@ -307,7 +307,11 @@ var recsReceivedCalled = false; function rresultHandleMods(r) { var rec = r.getResultObject(); runEvt('result', 'recordReceived', rec, r.userdata, false); - resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS); + // Don't display copy counts if we're an online-only bib + // FIXME: more robust logic, centralize and remove hardcoded string + if (rec.online_loc()[0].substring(0,20) != "http://via.tadl.org/") { + resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS); + } if(resultPageIsDone() && !recsReceivedCalled) { recsReceivedCalled = true; runEvt('result', 'allRecordsReceived', recordsCache); diff --git a/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml b/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml index ae62e57611..9fdf85767c 100644 --- a/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml +++ b/Open-ILS/web/opac/skin/tadlv2/xml/page_rdetail.xml @@ -2,7 +2,7 @@ - + diff --git a/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml b/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml index 9a39c77aa7..201de65258 100644 --- a/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml +++ b/Open-ILS/web/opac/skin/tadlv2/xml/page_rresult.xml @@ -1,6 +1,6 @@
- + -- 2.11.0