diff options
author | Yorhel <git@yorhel.nl> | 2019-10-12 14:11:06 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-10-12 14:11:06 +0200 |
commit | 0be1aa6acb62c13b4bcb4bd52a9c76df5f248e45 (patch) | |
tree | 8bfef25c3a01c740657d2ff2554ad73454d08d27 /elm | |
parent | 748ae0c68b5f060807aeb5b201f611859c428c79 (diff) |
v2rw: Convert user notifications interface (/u+/notifies)
Diffstat (limited to 'elm')
-rw-r--r-- | elm/global.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/elm/global.js b/elm/global.js index f1c5444a..d396e0bc 100644 --- a/elm/global.js +++ b/elm/global.js @@ -24,3 +24,15 @@ document.querySelectorAll('div[data-elm-module]').forEach(function(el) { else mod.init({ node: el }); }); + + +/* "check all" checkbox */ +document.querySelectorAll('input[type=checkbox].checkall').forEach(function(el) { + el.onclick = function() { + document.querySelectorAll('input[type=checkbox][name="'+el.name+'"]').forEach(function(el2) { + if(!el2.classList.contains('hidden')) { + el2.checked = el.checked; + } + }); + }; +}); |