mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
a9fb2af7ea
Ref #1413 - If the user stops typing for 5 seconds, a "typingPause" action is sent from the GhCodemirrorComponent - Editor-base-controller ties the "typingPause" action to its "autosave" - If a post is being saved and does not have a title, the title is set to "(Untitled)" - Cleanup editor base controller property dependencies and code
19 lines
571 B
JavaScript
19 lines
571 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.transitionToRoute('editor.edit', model);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default EditorNewController;
|