diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-12 16:31:12 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-24 09:12:57 +0200 |
commit | 467327771aea031c0ad6e7ab0e8f5a97ba69a8e2 (patch) | |
tree | 43b1ec77eeb062ee618f017a3dc09cd42491c695 /app/Resources/static/themes/material/index.js | |
parent | 31e3a233a457ee986d1cb347f7d02752159d5750 (diff) | |
download | wallabag-467327771aea031c0ad6e7ab0e8f5a97ba69a8e2.tar.gz wallabag-467327771aea031c0ad6e7ab0e8f5a97ba69a8e2.tar.zst wallabag-467327771aea031c0ad6e7ab0e8f5a97ba69a8e2.zip |
Added mass actions for Material design in list view
Diffstat (limited to 'app/Resources/static/themes/material/index.js')
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index da055e80..1c28401d 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -105,4 +105,17 @@ $(document).ready(() => { | |||
105 | $('.nav-panels').css('background', 'transparent'); | 105 | $('.nav-panels').css('background', 'transparent'); |
106 | return false; | 106 | return false; |
107 | }); | 107 | }); |
108 | |||
109 | const mainCheckboxes = document.querySelectorAll('[data-js="checkboxes-toggle"]'); | ||
110 | if (mainCheckboxes.length) { | ||
111 | [...mainCheckboxes].forEach((el) => { | ||
112 | el.addEventListener('click', () => { | ||
113 | const checkboxes = document.querySelectorAll(el.dataset.toggle); | ||
114 | [...checkboxes].forEach((checkbox) => { | ||
115 | const checkboxClone = checkbox; | ||
116 | checkboxClone.checked = el.checked; | ||
117 | }); | ||
118 | }); | ||
119 | }); | ||
120 | } | ||
108 | }); | 121 | }); |