]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/Resources/static/themes/material/js/tools.js
Move icon into the top menu bar
[github/wallabag/wallabag.git] / app / Resources / static / themes / material / js / tools.js
CommitLineData
64f81bc3
TC
1import $ from 'jquery';
2
3function 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');
50f35f0d 11
64f81bc3
TC
12 return false;
13 });
14 }
15}
16
17function initExport() {
18 // no display if export not available
19 if ($('div').is('#export')) {
20 $('#button_export').show();
21 $('.js-export-action').sideNav({ edge: 'right' });
22 }
23}
24
50f35f0d
JB
25function initRandom() {
26 // no display if export (ie: entries) not available
27 if ($('div').is('#export')) {
28 $('#button_random').show();
29 }
30}
31
32export {
33 initExport,
34 initFilters,
35 initRandom,
36};