MDL-32150 Libraries: checkall and uncheckall will not select disabled or readonly checkboxes

This commit is contained in:
Rajesh Taneja 2012-03-22 10:09:39 +08:00
parent a280078197
commit af8def57f6

View File

@ -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;
}
}