0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixes static pages when permalinks are active.

fixes #2938
- Fix `page === 1` occurences
- Fix ember logic
This commit is contained in:
Fabian Becker 2014-06-12 11:44:10 +02:00
parent 12ef319d73
commit 5eafa15b1b

View file

@ -5,16 +5,16 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
var self = this;
if (arguments.length > 1) {
this.set('page', val ? 1 : 0);
this.set('page', val);
return this.get('model').save().then(function () {
self.notifications.showSuccess('Successfully converted to ' + (val ? 'static page' : 'post'));
return !!self.get('page');
return self.get('page');
}, this.notifications.showErrors);
}
return !!this.get('page');
return this.get('page');
}.property('page'),
newSlugBinding: Ember.computed.oneWay('slug'),