X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d71968e15d1f77dc04908f30237e37163d54efde..4dae2117bd399c1076973d325c6425e79fda1220:/project/static/js/views/editor.js?ds=sidebyside diff --git a/project/static/js/views/editor.js b/project/static/js/views/editor.js index 04e22c86..10c77f63 100644 --- a/project/static/js/views/editor.js +++ b/project/static/js/views/editor.js @@ -7,7 +7,6 @@ var EditorView = View.extend({ init: function(element, model, template) { this._super(element, model, template); - this.model.load(); this.quickSaveButton = $('#action-quick-save', this.element).bind('click.editorview', this.quickSave.bind(this)); this.commitButton = $('#action-commit', this.element).bind('click.editorview', this.commit.bind(this)); @@ -16,7 +15,7 @@ var EditorView = View.extend({ this.model.addObserver(this, 'state', this.modelStateChanged.bind(this)); this.modelStateChanged('state', this.model.get('state')); - + // Inicjalizacja okien jQuery Modal $('#commit-dialog', this.element). jqm({ @@ -34,10 +33,12 @@ var EditorView = View.extend({ // onShow: $.fbind(self, self.loadSplitDialog) // }). // jqmAddClose('button.dialog-close-button'); + + this.model.load(); }, quickSave: function(event) { - this.model.updateDirtyContentModel(); + this.model.saveDirtyContentModel(); }, commit: function(event) {