mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Prettifier
This commit is contained in:
parent
82727b825c
commit
a3ed24c766
@ -79,7 +79,7 @@ Module.register("alert", {
|
|||||||
|
|
||||||
//If module already has an open alert close it
|
//If module already has an open alert close it
|
||||||
if (this.alerts[sender.name]) {
|
if (this.alerts[sender.name]) {
|
||||||
this.hide_alert(sender,false);
|
this.hide_alert(sender, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Display title and message only if they are provided in notification parameters
|
//Display title and message only if they are provided in notification parameters
|
||||||
@ -114,7 +114,7 @@ Module.register("alert", {
|
|||||||
}, params.timer);
|
}, params.timer);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hide_alert: function (sender,close=true) {
|
hide_alert: function (sender, close = true) {
|
||||||
//Dismiss alert and remove from this.alerts
|
//Dismiss alert and remove from this.alerts
|
||||||
if (this.alerts[sender.name]) {
|
if (this.alerts[sender.name]) {
|
||||||
this.alerts[sender.name].dismiss(close);
|
this.alerts[sender.name].dismiss(close);
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
/**
|
/**
|
||||||
* Dismiss the notification
|
* Dismiss the notification
|
||||||
*/
|
*/
|
||||||
NotificationFx.prototype.dismiss = function (close=true) {
|
NotificationFx.prototype.dismiss = function (close = true) {
|
||||||
this.active = false;
|
this.active = false;
|
||||||
clearTimeout(this.dismissttl);
|
clearTimeout(this.dismissttl);
|
||||||
this.ntf.classList.remove("ns-show");
|
this.ntf.classList.remove("ns-show");
|
||||||
@ -131,7 +131,7 @@
|
|||||||
this.ntf.classList.add("ns-hide");
|
this.ntf.classList.add("ns-hide");
|
||||||
|
|
||||||
// callback
|
// callback
|
||||||
if(close) this.options.onClose();
|
if (close) this.options.onClose();
|
||||||
}, 25);
|
}, 25);
|
||||||
|
|
||||||
// after animation ends remove ntf from the DOM
|
// after animation ends remove ntf from the DOM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user