From 214572e535ba0535cbb3e18c30ebc1893a8ad215 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Wed, 1 Jul 2020 16:10:48 -0700 Subject: [PATCH] Update JS "check all" logic for jquery upgrade, fixes #4619 --- Changes.md | 5 +++++ web/assets/javascripts/application.js | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Changes.md b/Changes.md index 612d573d6..4b66aceed 100644 --- a/Changes.md +++ b/Changes.md @@ -2,6 +2,11 @@ [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md) +HEAD +--------- + +- Fix "check all" JS logic in Web UI [#4619] + 6.1.0 --------- diff --git a/web/assets/javascripts/application.js b/web/assets/javascripts/application.js index 210464414..e7375cc07 100644 --- a/web/assets/javascripts/application.js +++ b/web/assets/javascripts/application.js @@ -24,12 +24,7 @@ $(function() { } $(document).on('click', '.check_all', function() { - var checked = $(this).attr('checked'); - if (checked == 'checked') { - $('input[type=checkbox]', $(this).closest('table')).attr('checked', checked); - } else { - $('input[type=checkbox]', $(this).closest('table')).removeAttr('checked'); - } + $('input[type=checkbox]', $(this).closest('table')).prop('checked', this.checked); }); $(document).on("click", "[data-confirm]", function() {