From: Galen Charlton Date: Sat, 11 Aug 2018 00:28:47 +0000 (-0400) Subject: show clear cart link only when cart has contents X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1caff94ebb107031ef859ec9b33c3b61eb116b8a;p=working%2FEvergreen.git show clear cart link only when cart has contents Signed-off-by: Galen Charlton --- 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; }