Rewrite checkAll to jQuery

pull/3412/head
Stefan Botzenhart 9 years ago
parent e95fd22218
commit e6a0e696c6
  1. 11
      app/assets/javascripts/application.js.erb

@ -95,13 +95,10 @@ jQuery(document).ready(function ($) {
}); });
}); });
function checkAll (id, checked) { function checkAll(selector, checked) {
var els = Element.descendants(id); jQuery('#' + selector + ' input:checkbox').each(function() {
for (var i = 0; i < els.length; i++) { this.checked = checked;
if (els[i].disabled === false) { });
els[i].checked = checked;
}
}
} }
function toggleCheckboxesBySelector(selector) { function toggleCheckboxesBySelector(selector) {

Loading…
Cancel
Save