mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Fix alerts disappearing when navigating
closes #5707 - fix disappearing alerts after transitions by not clearing all alerts/notifications when closing menus - remove `notifications.closeNotifications()` calls left over from needing to clear validation notifications
This commit is contained in:
parent
566bc03f5f
commit
d633bf315f
@ -44,7 +44,6 @@ export default Ember.Controller.extend(ValidationEngine, {
|
||||
$('#login').find('input').trigger('change');
|
||||
|
||||
this.validate({format: false}).then(function () {
|
||||
self.get('notifications').closeNotifications();
|
||||
self.send('authenticate');
|
||||
}).catch(function (errors) {
|
||||
self.get('notifications').showErrors(errors);
|
||||
|
@ -37,7 +37,6 @@ export default Ember.Controller.extend({
|
||||
|
||||
this.set('uploadButtonText', 'Importing');
|
||||
this.set('importErrors', '');
|
||||
notifications.closeNotifications();
|
||||
|
||||
formData.append('importfile', file);
|
||||
|
||||
|
@ -107,8 +107,6 @@ export default Ember.Controller.extend(SettingsSaveMixin, {
|
||||
// we need to have navigationItems recomputed.
|
||||
this.get('model').notifyPropertyChange('navigation');
|
||||
|
||||
notifications.closeNotifications();
|
||||
|
||||
return this.get('model').save().catch(function (err) {
|
||||
notifications.showErrors(err);
|
||||
});
|
||||
|
@ -50,7 +50,6 @@ export default Ember.Controller.extend(ValidationEngine, {
|
||||
$('#login').find('input').trigger('change');
|
||||
|
||||
this.validate({property: 'signin'}).then(function () {
|
||||
self.get('notifications').closeNotifications();
|
||||
self.toggleProperty('loggingIn');
|
||||
self.send('authenticate');
|
||||
}).catch(function (error) {
|
||||
|
@ -48,7 +48,6 @@ export default Ember.Controller.extend(ValidationEngine, {
|
||||
notifications = this.get('notifications');
|
||||
|
||||
this.set('flowErrors', '');
|
||||
notifications.closeNotifications();
|
||||
|
||||
this.validate().then(function () {
|
||||
self.toggleProperty('submitting');
|
||||
|
@ -243,8 +243,7 @@ export default Ember.Mixin.create({
|
||||
timedSaveId = this.get('timedSaveId'),
|
||||
self = this,
|
||||
psmController = this.get('postSettingsMenuController'),
|
||||
promise,
|
||||
notifications = this.get('notifications');
|
||||
promise;
|
||||
|
||||
options = options || {};
|
||||
|
||||
@ -274,8 +273,6 @@ export default Ember.Mixin.create({
|
||||
this.set('timedSaveId', null);
|
||||
}
|
||||
|
||||
notifications.closeNotifications();
|
||||
|
||||
// Set the properties that are indirected
|
||||
// set markdown equal to what's in the editor, minus the image markers.
|
||||
this.set('model.markdown', this.get('editor').getValue());
|
||||
|
@ -8,11 +8,8 @@ var Router = Ember.Router.extend({
|
||||
|
||||
notifications: Ember.inject.service(),
|
||||
|
||||
clearNotifications: Ember.on('didTransition', function () {
|
||||
var notifications = this.get('notifications');
|
||||
|
||||
notifications.closeNotifications();
|
||||
notifications.displayDelayed();
|
||||
displayDelayedNotifications: Ember.on('didTransition', function () {
|
||||
this.get('notifications').displayDelayed();
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -40,7 +40,6 @@ export default Ember.Route.extend(ApplicationRouteMixin, ShortcutsRoute, {
|
||||
|
||||
closeMenus: function () {
|
||||
this.get('dropdown').closeDropdowns();
|
||||
this.get('notifications').closeAll();
|
||||
this.send('closeModal');
|
||||
this.controller.setProperties({
|
||||
showSettingsMenu: false,
|
||||
|
Loading…
Reference in New Issue
Block a user