From: Galen Charlton Date: Fri, 15 Jun 2018 17:11:19 +0000 (-0400) Subject: more fixed to select-all checkbox management X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9dfb987f63775e3e83b994a46f33bd1c93b5696f;p=working%2FEvergreen.git more fixed to select-all checkbox management --- 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 0faa7fcc8d..89de97356e 100644 --- a/Open-ILS/web/js/ui/default/opac/record_selectors.js +++ b/Open-ILS/web/js/ui/default/opac/record_selectors.js @@ -30,15 +30,20 @@ initialize(); function syncPageState() { + var all_checked = true; [].forEach.call(rec_selectors, function(el) { el.checked = mylist.includes(parseInt(el.value)); if (el.checked) { adjustLegacyControlsVis('checked', el.value); } else { + all_checked = false; adjustLegacyControlsVis('unchecked', el.value); } toggleRowHighlighting(el); }); + if (select_all_records_el && rec_selectors.length) { + select_all_records_el.checked = all_checked; + } checkMaxCartSize(); }