diff options
Diffstat (limited to 'app')
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index e16749f6..ba4552b8 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -77,12 +77,12 @@ $(document).ready(() => { | |||
77 | $('.progress .determinate').css('width', `${scrollPercent}%`); | 77 | $('.progress .determinate').css('width', `${scrollPercent}%`); |
78 | }); | 78 | }); |
79 | 79 | ||
80 | $('.notification').on('click', () => { | 80 | $('.notification .notification-action').on('click', (e) => { |
81 | $.ajax({ | 81 | const id = parseInt($(e.target).attr('data-id'), 10); |
82 | url: Routing.generate('notification-archive-all'), | 82 | fetch(Routing.generate('notification-archive', { notification: id }), { credentials: 'same-origin' }).then(() => { |
83 | method: 'GET', | 83 | $(e.target).parents('.notification').removeClass('light-blue lighten-5'); |
84 | }).done(() => { | ||
85 | $('#notifications').sideNav('hide'); | 84 | $('#notifications').sideNav('hide'); |
86 | }); | 85 | }); |
86 | return true; | ||
87 | }); | 87 | }); |
88 | }); | 88 | }); |