From ffdc18f9a78a7311c7ca462ede8183ab6073e01f Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Mon, 22 Sep 2014 18:17:09 +0100 Subject: [PATCH] Undisable nProgress Closes #4095 * Removes the line that killed nProgress for PSM * adds to styles to make nProgress appear again (ht @halfdan) IRC: http://107.20.237.151:8081/logs/%23ghost/20140922#pm51214 --- core/client/assets/sass/lib/nprogress.scss | 4 ++++ core/client/controllers/post-settings-menu.js | 23 +++++++------------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/core/client/assets/sass/lib/nprogress.scss b/core/client/assets/sass/lib/nprogress.scss index 4698dc606a..58ef19bc02 100644 --- a/core/client/assets/sass/lib/nprogress.scss +++ b/core/client/assets/sass/lib/nprogress.scss @@ -6,6 +6,10 @@ #nprogress { pointer-events: none; -webkit-pointer-events: none; + position: absolute; + top: 0; + left: 0; + z-index: 800; } #nprogress .bar { diff --git a/core/client/controllers/post-settings-menu.js b/core/client/controllers/post-settings-menu.js index 4d2763a002..4ebfb93a23 100644 --- a/core/client/controllers/post-settings-menu.js +++ b/core/client/controllers/post-settings-menu.js @@ -43,7 +43,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - model.save(this.get('saveOptions')).catch(function (errors) { + model.save().catch(function (errors) { self.showErrors(errors); self.set('selectedAuthor', author); model.rollback(); @@ -65,8 +65,6 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ .extend(Ember.PromiseProxyMixin) .create(deferred); }), - //Changes in the PSM are too minor to warrant NProgress firing - saveOptions: {disableNProgress: true}, /** * The placeholder is the published date of the post, * or the current date if the pubdate has not been set. @@ -192,7 +190,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); self.get('model').rollback(); }); @@ -271,12 +269,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - return self.get('model').save(self.get('saveOptions')); - }).then(function (changed) { - if (changed) { - self.showSuccess('Permalink successfully changed to ' + - self.get('slug') + '.'); - } + return self.get('model').save(); }).catch(function (errors) { self.showErrors(errors); self.get('model').rollback(); @@ -331,7 +324,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); self.get('model').rollback(); }); @@ -354,7 +347,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); }); }, @@ -376,7 +369,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); }); }, @@ -390,7 +383,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); self.get('model').rollback(); }); @@ -405,7 +398,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ return; } - this.get('model').save(this.get('saveOptions')).catch(function (errors) { + this.get('model').save().catch(function (errors) { self.showErrors(errors); self.get('model').rollback(); });