Skip to content

Commit

Permalink
Le bouton de fermeture est maintenant à droite
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperAtraction committed Aug 19, 2023
1 parent f66f0ca commit 60da1a0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@
} else if (type === 1) {
icon = "Ok.png";
}
openWindow(icon, title, message, 1);
var notificationContent = `
<span>${message}</span><div style='display: flex; flex-direction: column; align-items: flex-end;'>
<button type='button' onclick='closeWindow(this, 1, 1)'>FERMER</button>
</div>
`;
var notification = openWindow(icon, title, notificationContent, 1);

var notificationBar = $('#notificationBar');
var notificationCountElement = $('#notificationCount');
Expand Down Expand Up @@ -686,7 +691,7 @@
return "window_content_" + Math.random().toString(36).substr(2, 9);
}

function closeWindow(button, isdb) {
function closeWindow(button, isdb, isnotif) {
if (isdb === 1) {
// Si la fenêtre est minimisée, fermer et supprimer la fenêtre de la liste des fenêtres minimisées
button.parentNode.parentNode.parentNode.remove();
Expand Down Expand Up @@ -732,6 +737,14 @@
observer.disconnect();
}
}
}if(isnotif==1){
if (notificationCount === 1) {
$("#notificationBar").fadeOut("slow");
notificationCount = 0;
} else {
notificationCount--;
}
document.getElementById("notificationCount").innerText = notificationCount;
}
}

Expand Down

0 comments on commit 60da1a0

Please sign in to comment.