mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 09:52:09 +03:00
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
|
|
|
var EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {
|
|
actions: {
|
|
/**
|
|
* Redirect to editor after the first save
|
|
*/
|
|
save: function () {
|
|
var self = this;
|
|
this._super().then(function (model) {
|
|
if (model.get('id')) {
|
|
self.transitionToRoute('editor.edit', model);
|
|
}
|
|
return model;
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default EditorNewController;
|