|
@@ -19,13 +19,21 @@ function markread(notif) {
|
|
|
xhr.responseType='json';
|
|
|
xhr.send();
|
|
|
xhr.onload=function() {
|
|
|
- notif.className='notifseen';
|
|
|
let jarr=xhr.response;
|
|
|
if (jarr['hmunseen']==0) {
|
|
|
notifimgon='imgs/bell_on.svg';
|
|
|
notifimgoff='imgs/bell_off.svg';
|
|
|
bell.src=notifimgon;
|
|
|
}
|
|
|
+
|
|
|
+ if (notif.classList.contains("notifunseen")){
|
|
|
+ // Notifica nella navbar
|
|
|
+ notif.className='notifseen';
|
|
|
+ } else if (notif.classList.contains("unseen")) {
|
|
|
+ // Notifica nella pagina di gestione notifiche
|
|
|
+ notif.classList.remove("unseen");
|
|
|
+ notif.classList.add("seen");
|
|
|
+ }
|
|
|
};
|
|
|
xhr.onerror=function() {
|
|
|
alert('La richiesta è fallita.');
|