mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
768e335735
issue #4305, issue #4259, issue #1413 - change new->edit transitionToRoute to be replaceRoute - auto focus in the editor on transition to the edit route - change the one-time autosave to happen on codemirror focusin instead of title focusout - re-add removed tests, and reorder broken test
20 lines
566 B
JavaScript
20 lines
566 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 (options) {
|
|
var self = this;
|
|
return this._super(options).then(function (model) {
|
|
if (model.get('id')) {
|
|
self.replaceRoute('editor.edit', model);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default EditorNewController;
|