4 M.core_user.init_participation = function(Y) {
5 Y.on('change', function() {
6 var action = Y.one('#formactionid');
7 if (action.get('value') == '') {
11 Y.all('input.usercheckbox').each(function() {
12 if (this.get('checked')) {
17 // no checkbox selected
20 Y.one('#participantsform').submit();
23 Y.on('click', function(e) {
24 // Presence of a show all link indicates we should redirect to
25 // a page with all users listed and checked, otherwise just check
26 // those already shown.
27 var showallink = this.getAttribute('data-showallink');
29 window.location = showallink;
31 Y.all('input.usercheckbox').each(function() {
32 this.set('checked', 'checked');
34 }, '#checkall, #checkallonpage');
36 Y.on('click', function(e) {
37 Y.all('input.usercheckbox').each(function() {
38 this.set('checked', '');
43 M.core_user.init_tree = function(Y, expand_all, htmlid) {
44 Y.use('yui2-treeview', function(Y) {
45 var tree = new Y.YUI2.widget.TreeView(htmlid);
47 tree.subscribe("clickEvent", function(node, event) {
48 // we want normal clicking which redirects to url