]> git.joonet.de Git - adminer.git/commitdiff
Don't try to check missing checkboxes
authorJakub Vrana <jakub@vrana.cz>
Tue, 20 Feb 2018 21:09:47 +0000 (22:09 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 20 Feb 2018 21:09:47 +0000 (22:09 +0100)
adminer/static/functions.js

index 75115923caf4404728dc642867d836568adc5cb2..f25fe4048ed06d601b82faaea8af198780ee6f5f 100644 (file)
@@ -205,14 +205,9 @@ function formCheck(name) {
 /** Check all rows in <table class="checkable">
 */
 function tableCheck() {
-       var tables = qsa('table', document);
-       for (var i=0; i < tables.length; i++) {
-               if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) {
-                       var trs = qsa('tr', tables[i]);
-                       for (var j=0; j < trs.length; j++) {
-                               trCheck(trs[j].firstChild.firstChild);
-                       }
-               }
+       var inputs = qsa('table.checkable td:first-child input', document);
+       for (var i=0; i < inputs.length; i++) {
+               trCheck(inputs[i]);
        }
 }