diff options
Diffstat (limited to 'src/jwebmail/static/src/dh-select-all-mails.js')
-rw-r--r-- | src/jwebmail/static/src/dh-select-all-mails.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jwebmail/static/src/dh-select-all-mails.js b/src/jwebmail/static/src/dh-select-all-mails.js new file mode 100644 index 0000000..73f8ff3 --- /dev/null +++ b/src/jwebmail/static/src/dh-select-all-mails.js @@ -0,0 +1,11 @@ +function check_all() { + const setTo = this.checked; + const chkbox = document.getElementsByClassName('jwm-mail-checkbox'); + + for (const m of chkbox) + m.checked = setTo; +} + +document.addEventListener("DOMContentLoaded", function() { + document.getElementById("check-all").addEventListener("click", check_all); +}); |