MDL-49963 core: Select all button on participant list works across pages

This commit is contained in:
Andrew Hancox 2016-01-13 13:48:01 +00:00
parent 03b8b55f10
commit 5b7c500a71
4 changed files with 248 additions and 4 deletions

View file

@ -21,10 +21,17 @@ M.core_user.init_participation = function(Y) {
}, '#formactionid');
Y.on('click', function(e) {
// Presence of a show all link indicates we should redirect to
// a page with all users listed and checked, otherwise just check
// those already shown.
var showallink = this.getAttribute('data-showallink');
if (showallink) {
window.location = showallink;
}
Y.all('input.usercheckbox').each(function() {
this.set('checked', 'checked');
});
}, '#checkall');
}, '#checkall, #checkallonpage');
Y.on('click', function(e) {
Y.all('input.usercheckbox').each(function() {