Skip to content
Browse files

MDL-32150 Libraries: checkall and uncheckall will not select disabled…

… or readonly checkboxes
  • Loading branch information...
1 parent c54172b commit 22e4bd42559d9dd35d0d475416aeb34fd16fbb0f @rajeshtaneja rajeshtaneja committed Mar 22, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/javascript-static.js
View
6 lib/javascript-static.js
@@ -796,6 +796,9 @@ function checkall() {
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == 'checkbox') {
+ if (inputs[i].disabled || inputs[i].readOnly) {
+ continue;
+ }
inputs[i].checked = true;
}
}
@@ -805,6 +808,9 @@ function checknone() {
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == 'checkbox') {
+ if (inputs[i].disabled || inputs[i].readOnly) {
+ continue;
+ }
inputs[i].checked = false;
}
}

0 comments on commit 22e4bd4

Please sign in to comment.
Something went wrong with that request. Please try again.