forked from danmarsden/moodle_mod_attforblock_old
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.js
More file actions
27 lines (23 loc) · 726 Bytes
/
module.js
File metadata and controls
27 lines (23 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
M.mod_attforblock = {}
M.mod_attforblock.init_manage = function(Y) {
Y.on('click', function(e) {
if (e.target.get('checked'))
checkall();
else
checknone();
}, '#cb_selector' );
};
M.mod_attforblock.set_preferences_action = function(action) {
var item = document.getElementById('preferencesaction');
if (item) {
item.setAttribute('value', action);
}
else {
item = document.getElementById('preferencesform');
var input = document.createElement("input");
input.setAttribute("type", "hidden");
input.setAttribute("name", "action");
input.setAttribute("value", action);
item.appendChild(input);
}
};