We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37fbc17 commit b842ac2Copy full SHA for b842ac2
app/assets/javascripts/administrate_batch_actions/script.js
@@ -3,6 +3,17 @@ var checkboxes = document.querySelectorAll("[data-batch-action-option='checkbox'
3
var selectAllCheckboxes = document.querySelector("[data-batch-action-option='select_all']");
4
5
if (selectAllCheckboxes && checkboxes && buttons) {
6
+
7
+ window.onpageshow = function(event) {
8
+ if (selectedItemIds()) {
9
+ checkboxes.forEach(function(checkbox) {
10
+ checkbox.checked = false;
11
+ });
12
13
+ selectAllCheckboxes.checked = false;
14
+ }
15
+ };
16
17
selectAllCheckboxes.addEventListener('click', function(){
18
checkboxes.forEach(function(checkbox) {
19
checkbox.checked = selectAllCheckboxes.checked;
0 commit comments