summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 17:45:25 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 17:45:25 -0400
commitbcb8761d36eb0297d8675f6af17957f9accc5b7b (patch)
treef1014b235c1aee8400efe46afbe4afaa4279a819
parent0a9d5311c576a077af33678b148dff811325085d (diff)
downloadbrdo-bcb8761d36eb0297d8675f6af17957f9accc5b7b.tar.gz
brdo-bcb8761d36eb0297d8675f6af17957f9accc5b7b.tar.bz2
Issue #1995058 by TravisCarden, acbramley, vbouchet: Tableselect "select all" checkbox should be checked on page load if all checkboxes are ticked
-rw-r--r--misc/tableselect.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/tableselect.js b/misc/tableselect.js
index 8f0cd9750..09bac1390 100644
--- a/misc/tableselect.js
+++ b/misc/tableselect.js
@@ -57,6 +57,10 @@ Drupal.tableSelect = function () {
// Keep track of the last checked checkbox.
lastChecked = e.target;
});
+
+ // If all checkboxes are checked on page load, make sure the select-all one
+ // is checked too, otherwise keep unchecked.
+ updateSelectAll((checkboxes.length == $(checkboxes).filter(':checked').length));
};
Drupal.tableSelectRange = function (from, to, state) {