Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bootstrap-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from: "top",
align: "right"
},
restrict: 0,
offset: 20,
spacing: 10,
z_index: 1031,
Expand Down Expand Up @@ -121,6 +122,12 @@
//if duplicate messages are not allowed, then only continue if this new message is not a duplicate of one that it already showing
if (this.settings.allow_duplicates || (!this.settings.allow_duplicates && !isDuplicateNotification(this))) {
this.init();

// if restrict
var _length = $('[data-notify="container"]').length;
if (this.settings.restrict > 0 && _length >= this.settings.restrict) {
$('[data-notify="container"]').find('button[data-notify="dismiss"]').slice(0,_length-this.settings.restrict).trigger('click');
}
}
}

Expand Down Expand Up @@ -413,5 +420,3 @@


}));