X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/84132f4ec69d46ec216d1fe1d5adc5e5ee8a4798..ad481d9335cb91f56adfffda3999284f37d37942:/project/static/js/views/editor.js diff --git a/project/static/js/views/editor.js b/project/static/js/views/editor.js index b3c9563b..891c8abc 100644 --- a/project/static/js/views/editor.js +++ b/project/static/js/views/editor.js @@ -8,5 +8,29 @@ var EditorView = View.extend({ init: function(element, model, template) { this._super(element, model, template); this.model.load(); + + $('#action-quick-save', this.element).bind('click.editorview', this.quickSave.bind(this)); + $('#action-commit', this.element).bind('click.editorview', this.commit.bind(this)); + $('#action-update', this.element).bind('click.editorview', this.update.bind(this)); + this.freeze('Ładowanie'); + }, + + quickSave: function(event) { + console.log('quickSave'); + }, + + commit: function(event) { + console.log('commit'); + }, + + update: function(event) { + console.log('update'); + }, + + dispose: function() { + $('#action-quick-save', this.element).unbind('click.editorview'); + $('#action-commit', this.element).unbind('click.editorview'); + $('#action-update', this.element).unbind('click.editorview'); + this._super(); } });