[follow up] moebius#154: Notifications - user settings - the immediate duration of the alert

https://github.com/MoonchildProductions/moebius/pull/154
https://github.com/MoonchildProductions/UXP/pull/132
This commit is contained in:
janekptacijarabaci 2018-05-05 10:46:33 +02:00 committed by Roy Tam
commit d520c739ac
2 changed files with 2 additions and 2 deletions

View file

@ -313,6 +313,7 @@ function onAlertClick() {
let alertBox = document.getElementById("alertBox");
if (alertBox.getAttribute("animate") == "true") {
// Closed when the animation ends.
alertBox.style.animationDuration = ".6s";
alertBox.setAttribute("clicked", "true");
} else {
window.close();
@ -355,6 +356,7 @@ function onAlertClose() {
let alertBox = document.getElementById("alertBox");
if (alertBox.getAttribute("animate") == "true") {
// Closed when the animation ends.
alertBox.style.animationDuration = ".6s";
alertBox.setAttribute("closing", "true");
} else {
window.close();

View file

@ -15,14 +15,12 @@
}
#alertBox[animate][clicked] {
animation-duration: .6s;
animation-name: alert-clicked-animation;
}
/* This is used if the close button is clicked
before the animation has finished. */
#alertBox[animate][closing] {
animation-duration: .6s;
animation-name: alert-closing-animation;
}