moved alert auto-disappear default delay to variable
This commit is contained in:
parent
deb2390337
commit
1e6e169b1d
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
var ALERT_INVISIBLE_CLASS = 'alert--invisible';
|
var ALERT_INVISIBLE_CLASS = 'alert--invisible';
|
||||||
var TOGGLER_INVISIBLE_CLASS = 'alerts__toggler--visible';
|
var TOGGLER_INVISIBLE_CLASS = 'alerts__toggler--visible';
|
||||||
|
var ALERT_AUTO_DISAPPEAR_DELAY = 10;
|
||||||
|
|
||||||
var alertsShowingToggler = false;
|
var alertsShowingToggler = false;
|
||||||
|
|
||||||
window.utils.alerts = function(alertsEl) {
|
window.utils.alerts = function(alertsEl) {
|
||||||
@ -29,7 +31,7 @@
|
|||||||
var iconEl = document.createElement('DIV');
|
var iconEl = document.createElement('DIV');
|
||||||
var closeEl = document.createElement('DIV');
|
var closeEl = document.createElement('DIV');
|
||||||
var dataDecay = alertEl.dataset.decay;
|
var dataDecay = alertEl.dataset.decay;
|
||||||
var autoDecay = 10;
|
var autoDecay = ALERT_AUTO_DISAPPEAR_DELAY;
|
||||||
if (dataDecay) {
|
if (dataDecay) {
|
||||||
autoDecay = parseInt(dataDecay, 10);
|
autoDecay = parseInt(dataDecay, 10);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user