Skip to content

Commit

Permalink
Merge branch 'MDL-57125-master' of git://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Dec 13, 2016
2 parents ae2bf16 + 1f8d398 commit a7471c4
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions comment/comment.js
Expand Up @@ -410,19 +410,21 @@ M.core_comment = {
},
init_admin: function(Y) {
var select_all = Y.one('#comment_select_all');
select_all.on('click', function(e) {
var comments = document.getElementsByName('comments');
var checked = false;
for (var i in comments) {
if (comments[i].checked) {
checked=true;
if (select_all) {
select_all.on('click', function(e) {
var comments = document.getElementsByName('comments');
var checked = false;
for (var i in comments) {
if (comments[i].checked) {
checked=true;
}
}
}
for (i in comments) {
comments[i].checked = !checked;
}
this.set('checked', !checked);
});
for (i in comments) {
comments[i].checked = !checked;
}
this.set('checked', !checked);
});
}

var comments_delete = Y.one('#comments_delete');
if (comments_delete) {
Expand Down

0 comments on commit a7471c4

Please sign in to comment.