diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-05-09 11:43:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 11:43:48 +0200 |
commit | b28c5430efefa63d04d87404c99798e82d0427e4 (patch) | |
tree | 0bf158fb56120be6624fa26639a28beb84a6598e /app/Resources/static/themes/material/js/tools.js | |
parent | 43f81a62e93fb20c7af619a5132276706e989c62 (diff) | |
parent | efac66cb56d650b863b64c9c4582589da6a2442a (diff) | |
download | wallabag-b28c5430efefa63d04d87404c99798e82d0427e4.tar.gz wallabag-b28c5430efefa63d04d87404c99798e82d0427e4.tar.zst wallabag-b28c5430efefa63d04d87404c99798e82d0427e4.zip |
Merge pull request #3022 from wallabag/webpack
Adds Webpack support and remove Grunt
Diffstat (limited to 'app/Resources/static/themes/material/js/tools.js')
-rw-r--r-- | app/Resources/static/themes/material/js/tools.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js new file mode 100644 index 00000000..39398fd8 --- /dev/null +++ b/app/Resources/static/themes/material/js/tools.js | |||
@@ -0,0 +1,24 @@ | |||
1 | import $ from 'jquery'; | ||
2 | |||
3 | function initFilters() { | ||
4 | // no display if filters not available | ||
5 | if ($('div').is('#filters')) { | ||
6 | $('#button_filters').show(); | ||
7 | $('.js-filters-action').sideNav({ edge: 'right' }); | ||
8 | $('#clear_form_filters').on('click', () => { | ||
9 | $('#filters input').val(''); | ||
10 | $('#filters :checked').removeAttr('checked'); | ||
11 | return false; | ||
12 | }); | ||
13 | } | ||
14 | } | ||
15 | |||
16 | function initExport() { | ||
17 | // no display if export not available | ||
18 | if ($('div').is('#export')) { | ||
19 | $('#button_export').show(); | ||
20 | $('.js-export-action').sideNav({ edge: 'right' }); | ||
21 | } | ||
22 | } | ||
23 | |||
24 | export { initExport, initFilters }; | ||