From: zuber Date: Mon, 28 Sep 2009 09:12:36 +0000 (+0200) Subject: Dodanie akcji do przycisków Update, Commit i Quick Save (na razie pustych). X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/3dd811118b8168c78704c7271ca4e9c3e3be5079?hp=a5a6f4e2406b9e02a71ca1dba010fa8cbe5b4331 Dodanie akcji do przycisków Update, Commit i Quick Save (na razie pustych). --- diff --git a/project/static/js/views/editor.js b/project/static/js/views/editor.js index b3c9563b..cd1c4865 100644 --- a/project/static/js/views/editor.js +++ b/project/static/js/views/editor.js @@ -8,5 +8,28 @@ 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)); + }, + + 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(); } });