Browse Source

mustard: notifs: Aggiunti controlli per cancellare le notifiche.

* web/mustard/notifs.php: Aggiunto bottone per eliminare le notifiche,
  e temporaneamente ForkAwesome, giusto perchè mi sembrava very cool.
paul 4 years ago
parent
commit
81c3fd2722
1 changed files with 4 additions and 12 deletions
  1. 4 12
      web/mustard/notifs.php

+ 4 - 12
web/mustard/notifs.php

@@ -66,19 +66,10 @@ if ($filtordon) {
                 box.checked = check.checked;
             })
         }
-
-        function readAllSelected() {
-            let notifs = document.querySelectorAll("div#notifs-list > div");
-            notifs.forEach(function (notif) {
-                let checkbox = notif.querySelector("input.seen-checkbox");
-                if (checkbox.checked) {
-                    markread(notif);
-                }
-            })
-        }
-
         // -->
     </script>
+
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.1.7/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous">
 </head>
 <body>
 
@@ -101,7 +92,8 @@ if ($filtordon) {
     <div id="middlerow">
         <div id="notifs-list-controls">
             <input id="global-selector" type="checkbox" onclick="toggleState(this)">
-            <button onclick="readAllSelected()">Segna tutti come letto</button>
+            <button onclick="applyAllSelected(markread)"><i class="fa fa-envelope-open-o" aria-hidden="true"></i>Segna come letto</button>
+            <button onclick="applyAllSelected(markdeleted)"><i class="fa fa-trash-o" aria-hidden="true"></i>Cancella</button>
         </div>
         <div id="notifs-list">
             <?php