From: Jeff Davis Date: Thu, 4 Dec 2014 20:16:06 +0000 (-0800) Subject: RT24863: Suppress OD API on grouped records (metarecords) in search results X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=30cd30d667621a4613592da7b52276473772f932;p=contrib%2Foverdrive-eg-opac.git RT24863: Suppress OD API on grouped records (metarecords) in search results Signed-off-by: Jeff Davis --- 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