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.
This commit is contained in:
paul 2020-05-16 10:47:47 +02:00 committed by Giacomo Leidi
parent 3c7756f76f
commit a9e7bfb132

View file

@ -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