diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/application.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 4e8849842..f3d771a10 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -2,10 +2,10 @@ Copyright (C) 2006-2008 Jean-Philippe Lang */ function checkAll (id, checked) { - var el = document.getElementById(id); - for (var i = 0; i < el.elements.length; i++) { - if (el.elements[i].disabled==false) { - el.elements[i].checked = checked; + var els = Element.descendants(id); + for (var i = 0; i < els.length; i++) { + if (els[i].disabled==false) { + els[i].checked = checked; } } } |