Fasten notification element removal in list

pull/1/head
ClemDee 6 years ago
parent 19a3524ab5
commit 8f914786e0

@ -89,6 +89,9 @@
&:not(:first-child) {
border-top: 1px solid #ccc;
}
&.dismissed {
display: none;
}
.cp-notification-content {
flex-grow: 1;

@ -77,6 +77,11 @@ define([
if (el) {
// if the type of notification correspond
if (filterTypes.length === 0 || filterTypes.indexOf(data.content.msg.type) !== -1) {
var dismissHandler = data.content.dismissHandler;
data.content.dismissHandler = function () {
$(el).addClass("dismissed");
dismissHandler();
};
notifsData.push(data);
$(notifsList).prepend(el);
}

Loading…
Cancel
Save