mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-17 13:31:39 +03:00
f1a02b88a9
closes #2910 - create EditorController, PostSettingsMenuController - remove `posts.post` controllerName dependency on EditorRoute/NewRoute - `{{render}}` the PostSettingsMenuView with its own controller - break up properties/methods from PostsPostController into all three controllers - fix EditorRoute pagination options to now be comparable to PostsRoute - add NewController to force NewRoute to refresh editor with blank model. Identical to Editor's - EditorController and NewController are based on a shared mixin - NewView created, templateName is 'editor'
14 lines
317 B
JavaScript
14 lines
317 B
JavaScript
var PostController = Ember.ObjectController.extend({
|
|
isPublished: Ember.computed.equal('status', 'published'),
|
|
|
|
actions: {
|
|
toggleFeatured: function () {
|
|
this.set('featured', !this.get('featured'));
|
|
|
|
this.get('model').save();
|
|
}
|
|
}
|
|
});
|
|
|
|
export default PostController;
|