diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-24 09:37:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 09:37:23 +0200 |
commit | 8a8a78a64c116caf81aaa4339906298bdc0e32e0 (patch) | |
tree | 43b1ec77eeb062ee618f017a3dc09cd42491c695 /app | |
parent | 31e3a233a457ee986d1cb347f7d02752159d5750 (diff) | |
parent | 467327771aea031c0ad6e7ab0e8f5a97ba69a8e2 (diff) | |
download | wallabag-8a8a78a64c116caf81aaa4339906298bdc0e32e0.tar.gz wallabag-8a8a78a64c116caf81aaa4339906298bdc0e32e0.tar.zst wallabag-8a8a78a64c116caf81aaa4339906298bdc0e32e0.zip |
Merge pull request #4326 from wallabag/mass-actions
Added mass actions for Material design in list view
Diffstat (limited to 'app')
-rw-r--r-- | app/Resources/static/themes/material/css/entries.scss | 36 | ||||
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 13 |
2 files changed, 49 insertions, 0 deletions
diff --git a/app/Resources/static/themes/material/css/entries.scss b/app/Resources/static/themes/material/css/entries.scss index 5c55caa8..e22178a5 100644 --- a/app/Resources/static/themes/material/css/entries.scss +++ b/app/Resources/static/themes/material/css/entries.scss | |||
@@ -2,6 +2,42 @@ | |||
2 | * Entries | 2 | * Entries |
3 | * ========================================================================== */ | 3 | * ========================================================================== */ |
4 | 4 | ||
5 | .mass-buttons { | ||
6 | margin: 5px; | ||
7 | |||
8 | #selectAll { | ||
9 | position: relative; | ||
10 | opacity: initial; | ||
11 | left: 0; | ||
12 | } | ||
13 | |||
14 | span { | ||
15 | padding: 3px; | ||
16 | } | ||
17 | |||
18 | button { | ||
19 | i { | ||
20 | font-size: 12px; | ||
21 | } | ||
22 | |||
23 | height: 24px; | ||
24 | line-height: 24px; | ||
25 | padding: 0 0.5rem; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | .card-stacked { | ||
30 | input[type=checkbox] { | ||
31 | position: relative; | ||
32 | opacity: initial; | ||
33 | left: 0; | ||
34 | } | ||
35 | |||
36 | .entry-checkbox { | ||
37 | margin-right: 10px; | ||
38 | } | ||
39 | } | ||
40 | |||
5 | .collection { | 41 | .collection { |
6 | margin: 15px 15px 0; | 42 | margin: 15px 15px 0; |
7 | 43 | ||
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 | }); |