From: Galen Charlton Date: Mon, 13 Aug 2018 20:25:58 +0000 (-0400) Subject: disable basket actions when none selected X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d802385ef7a1bae8b0dcfa172441666ddb7a4ea0;p=working%2FEvergreen.git disable basket actions when none selected 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 2f57b05394..cf7956a56d 100644 --- a/Open-ILS/web/js/ui/default/opac/record_selectors.js +++ b/Open-ILS/web/js/ui/default/opac/record_selectors.js @@ -75,6 +75,20 @@ clear_basket_el.classList.add('hidden'); } } + if (select_action_el) { + if (mylist.length > 0) { + select_action_el.removeAttribute('disabled'); + } else { + select_action_el.setAttribute('disabled', 'disabled'); + } + } + if (do_basket_action_el) { + if (mylist.length > 0) { + do_basket_action_el.removeAttribute('disabled'); + } else { + do_basket_action_el.setAttribute('disabled', 'disabled'); + } + } if (record_basket_count_el) { record_basket_count_el.innerHTML = mylist.length; }