diff --git a/core/client/views/base.js b/core/client/views/base.js index 4fc59e300d..0f8371fd78 100644 --- a/core/client/views/base.js +++ b/core/client/views/base.js @@ -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; diff --git a/core/client/views/settings.js b/core/client/views/settings.js index 23c0354f40..3a6cfd2723 100644 --- a/core/client/views/settings.js +++ b/core/client/views/settings.js @@ -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; }