mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Merge pull request #378 from javorszky/iss342
Passive notifications are dismissed on settings pane change
This commit is contained in:
commit
24fbb45c23
@ -110,7 +110,11 @@
|
||||
Ghost.Views.NotificationCollection = Ghost.View.extend({
|
||||
el: '#flashbar',
|
||||
initialize: function () {
|
||||
var self = this;
|
||||
this.render();
|
||||
Backbone.history.on('route', function () {
|
||||
self.clearEverything();
|
||||
});
|
||||
},
|
||||
events: {
|
||||
'animationend .js-notification': 'removeItem',
|
||||
@ -133,6 +137,9 @@
|
||||
this.model.push(item);
|
||||
this.renderItem(item);
|
||||
},
|
||||
clearEverything: function () {
|
||||
this.$el.find('.js-notification.notification-passive').fadeOut(200, function () { $(this).remove(); });
|
||||
},
|
||||
removeItem: function (e) {
|
||||
e.preventDefault();
|
||||
var self = e.currentTarget;
|
||||
|
@ -43,7 +43,7 @@
|
||||
var self = this,
|
||||
model;
|
||||
|
||||
Backbone.history.navigate('/settings/' + id);
|
||||
Backbone.history.navigate('/settings/' + id, {trigger: true});
|
||||
if (this.pane && id === this.pane.el.id) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user