diff options
Diffstat (limited to 'app/Resources/static/themes/material')
4 files changed, 29 insertions, 2 deletions
diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index 416dc1c7..f45970de 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss | |||
@@ -36,6 +36,10 @@ | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | #notifications { | ||
40 | width: 300px; | ||
41 | } | ||
42 | |||
39 | .bold > a { | 43 | .bold > a { |
40 | font-weight: bold; | 44 | font-weight: bold; |
41 | } | 45 | } |
diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 7daf40ec..300015ab 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss | |||
@@ -30,3 +30,9 @@ nav .input-field input { | |||
30 | .tab { | 30 | .tab { |
31 | flex: 1; | 31 | flex: 1; |
32 | } | 32 | } |
33 | |||
34 | #notifications-count { | ||
35 | position: relative; | ||
36 | top: -50px; | ||
37 | left: 15px; | ||
38 | } | ||
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index d6afbb8a..e16749f6 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize'; | |||
8 | import '../_global/index'; | 8 | import '../_global/index'; |
9 | 9 | ||
10 | /* Tools */ | 10 | /* Tools */ |
11 | import { initExport, initFilters } from './js/tools'; | 11 | import { initExport, initFilters, initNotifications } from './js/tools'; |
12 | 12 | ||
13 | /* Import shortcuts */ | 13 | /* Import shortcuts */ |
14 | import './js/shortcuts/main'; | 14 | import './js/shortcuts/main'; |
@@ -34,6 +34,7 @@ $(document).ready(() => { | |||
34 | }); | 34 | }); |
35 | initFilters(); | 35 | initFilters(); |
36 | initExport(); | 36 | initExport(); |
37 | initNotifications(); | ||
37 | 38 | ||
38 | $('#nav-btn-add-tag').on('click', () => { | 39 | $('#nav-btn-add-tag').on('click', () => { |
39 | $('.nav-panel-add-tag').toggle(100); | 40 | $('.nav-panel-add-tag').toggle(100); |
@@ -75,4 +76,13 @@ $(document).ready(() => { | |||
75 | const scrollPercent = (s / (d - c)) * 100; | 76 | const scrollPercent = (s / (d - c)) * 100; |
76 | $('.progress .determinate').css('width', `${scrollPercent}%`); | 77 | $('.progress .determinate').css('width', `${scrollPercent}%`); |
77 | }); | 78 | }); |
79 | |||
80 | $('.notification').on('click', () => { | ||
81 | $.ajax({ | ||
82 | url: Routing.generate('notification-archive-all'), | ||
83 | method: 'GET', | ||
84 | }).done(() => { | ||
85 | $('#notifications').sideNav('hide'); | ||
86 | }); | ||
87 | }); | ||
78 | }); | 88 | }); |
diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js index 39398fd8..492640a0 100644 --- a/app/Resources/static/themes/material/js/tools.js +++ b/app/Resources/static/themes/material/js/tools.js | |||
@@ -21,4 +21,11 @@ function initExport() { | |||
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | export { initExport, initFilters }; | 24 | function initNotifications() { |
25 | if ($('div').is('#notifications')) { | ||
26 | $('#button_notifications').show(); | ||
27 | $('.js-notifications-action').sideNav({ edge: 'right' }); | ||
28 | } | ||
29 | } | ||
30 | |||
31 | export { initExport, initFilters, initNotifications }; | ||