From 30cd30d667621a4613592da7b52276473772f932 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Thu, 4 Dec 2014 12:16:06 -0800 Subject: [PATCH] RT24863: Suppress OD API on grouped records (metarecords) in search results Signed-off-by: Jeff Davis --- src/od_pages_opac.coffee | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/od_pages_opac.coffee b/src/od_pages_opac.coffee index 2c58250..e8d5105 100644 --- a/src/od_pages_opac.coffee +++ b/src/od_pages_opac.coffee @@ -68,18 +68,21 @@ define [ ids = [] for row in @ when id = $(row)._productID() - # Cache the ID so that we don't need to traverse the DOM again - ids.push id - - # Adorn each row with a product ID - $(row).prop 'id', id - # Add an empty container of format and availability values - .find '.results_info_table > tbody' - .append result - .end() - # Set up progress bars - ._results_meta() - ._results_avail() + # skip this row if it is a grouped record (metarecord) + unless $(row).find("abbr.unapi-id[title*='metabib-metarecord']").length > 0 + + # Cache the ID so that we don't need to traverse the DOM again + ids.push id + + # Adorn each row with a product ID + $(row).prop 'id', id + # Add an empty container of format and availability values + .find '.results_info_table > tbody' + .append result + .end() + # Set up progress bars + ._results_meta() + ._results_avail() return ids -- 2.11.0