]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/Resources/static/themes/material/index.js
First draft for notifications
[github/wallabag/wallabag.git] / app / Resources / static / themes / material / index.js
index 435cd02f1a69f26f878fb32d3a1a27df20a48f30..e16749f6d9c310f522324ab04b237bf8847c72fa 100755 (executable)
@@ -76,4 +76,13 @@ $(document).ready(() => {
     const scrollPercent = (s / (d - c)) * 100;
     $('.progress .determinate').css('width', `${scrollPercent}%`);
   });
+
+  $('.notification').on('click', () => {
+    $.ajax({
+      url: Routing.generate('notification-archive-all'),
+      method: 'GET',
+    }).done(() => {
+      $('#notifications').sideNav('hide');
+    });
+  });
 });