From 1caff94ebb107031ef859ec9b33c3b61eb116b8a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 10 Aug 2018 20:28:47 -0400 Subject: [PATCH] show clear cart link only when cart has contents Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/opac/record_selectors.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Open-ILS/web/js/ui/default/opac/record_selectors.js b/Open-ILS/web/js/ui/default/opac/record_selectors.js index 23e76922a8..c396abe69b 100644 --- a/Open-ILS/web/js/ui/default/opac/record_selectors.js +++ b/Open-ILS/web/js/ui/default/opac/record_selectors.js @@ -66,6 +66,13 @@ if (selected_records_count_el) { selected_records_count_el.innerHTML = mylist.length; } + if (clear_basket_el) { + if (mylist.length > 0) { + clear_basket_el.classList.remove('hidden'); + } else { + clear_basket_el.classList.add('hidden'); + } + } if (record_basket_count_el) { record_basket_count_el.innerHTML = mylist.length; } -- 2.11.0