Allow clicking on checkboxes for batch update
This commit is contained in:
12
Gemfile.lock
12
Gemfile.lock
@ -314,18 +314,18 @@ GEM
|
|||||||
pundit (2.3.1)
|
pundit (2.3.1)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
racc (1.7.3)
|
racc (1.7.3)
|
||||||
rack (3.0.8)
|
rack (2.2.8)
|
||||||
rack-mini-profiler (3.1.1)
|
rack-mini-profiler (3.1.1)
|
||||||
rack (>= 1.2.0)
|
rack (>= 1.2.0)
|
||||||
rack-proxy (0.7.7)
|
rack-proxy (0.7.7)
|
||||||
rack
|
rack
|
||||||
rack-session (2.0.0)
|
rack-session (1.0.1)
|
||||||
rack (>= 3.0.0)
|
rack (< 3)
|
||||||
rack-test (2.1.0)
|
rack-test (2.1.0)
|
||||||
rack (>= 1.3)
|
rack (>= 1.3)
|
||||||
rackup (2.1.0)
|
rackup (1.0.0)
|
||||||
rack (>= 3)
|
rack (< 3)
|
||||||
webrick (~> 1.8)
|
webrick
|
||||||
rails (7.1.2)
|
rails (7.1.2)
|
||||||
actioncable (= 7.1.2)
|
actioncable (= 7.1.2)
|
||||||
actionmailbox (= 7.1.2)
|
actionmailbox (= 7.1.2)
|
||||||
|
@ -134,6 +134,10 @@ $(document).on('turbolinks:load', function () {
|
|||||||
class: 'form-check-input',
|
class: 'form-check-input',
|
||||||
});
|
});
|
||||||
td.on('click', function (event) {
|
td.on('click', function (event) {
|
||||||
|
if (event.target !== this) {
|
||||||
|
// We don't want to trigger the handler when clicking directly on the checkbox.
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
checkbox.prop('checked', !checkbox.prop('checked'));
|
checkbox.prop('checked', !checkbox.prop('checked'));
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user