0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Merge pull request #5710 from kevinansfield/fix-alerts-closing-on-transition

Fix alerts disappearing when navigating
This commit is contained in:
Hannah Wolfe 2015-08-24 17:53:35 +01:00
commit 222ecc08b6
8 changed files with 3 additions and 16 deletions

View file

@ -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);

View file

@ -37,7 +37,6 @@ export default Ember.Controller.extend({
this.set('uploadButtonText', 'Importing');
this.set('importErrors', '');
notifications.closeNotifications();
formData.append('importfile', file);

View 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);
});

View file

@ -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) {

View file

@ -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');

View file

@ -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());

View file

@ -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();
})
});

View file

@ -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,