]> git.mjollnir.org Git - moodle.git/commitdiff
fix for 5216
authortoyomoyo <toyomoyo>
Fri, 21 Apr 2006 05:17:08 +0000 (05:17 +0000)
committertoyomoyo <toyomoyo>
Fri, 21 Apr 2006 05:17:08 +0000 (05:17 +0000)
lib/javascript-static.js

index 3fe0dda3759ec8786bdbb5441195dfec110415b5..f49b93bf3e813815e46409973406f56687ee206f 100644 (file)
@@ -85,7 +85,7 @@ function select_all_in(elTagName, elClass, elId) {
     var inputs = document.getElementsByTagName('INPUT');
     inputs = filterByParent(inputs, function(el) {return findParentNode(el, elTagName, elClass, elId);});
     for(var i = 0; i < inputs.length; ++i) {
-        if(inputs[i].type == 'checkbox') {
+        if(inputs[i].type == 'checkbox' || inputs[i].type == 'radio') {
             inputs[i].checked = 'checked';
         }
     }
@@ -95,7 +95,7 @@ function deselect_all_in(elTagName, elClass, elId) {
     var inputs = document.getElementsByTagName('INPUT');
     inputs = filterByParent(inputs, function(el) {return findParentNode(el, elTagName, elClass, elId);});
     for(var i = 0; i < inputs.length; ++i) {
-        if(inputs[i].type == 'checkbox') {
+        if(inputs[i].type == 'checkbox' || inputs[i].type == 'radio') {
             inputs[i].checked = '';
         }
     }