891c8abc5f2815ac500d0b0cf62ff6a7f9cbe885
[redakcja.git] / project / static / js / views / editor.js
1 /*global View render_template panels */
2 var EditorView = View.extend({
3   _className: 'EditorView',
4   element: null,
5   model: null,
6   template: null,
7   
8   init: function(element, model, template) {
9     this._super(element, model, template);
10     this.model.load();
11     
12     $('#action-quick-save', this.element).bind('click.editorview', this.quickSave.bind(this));
13     $('#action-commit', this.element).bind('click.editorview', this.commit.bind(this));
14     $('#action-update', this.element).bind('click.editorview', this.update.bind(this));
15     this.freeze('Ɓadowanie');
16   },
17   
18   quickSave: function(event) {
19     console.log('quickSave');
20   },
21   
22   commit: function(event) {
23     console.log('commit');
24   },
25   
26   update: function(event) {
27     console.log('update');
28   },
29   
30   dispose: function() {
31     $('#action-quick-save', this.element).unbind('click.editorview');
32     $('#action-commit', this.element).unbind('click.editorview');
33     $('#action-update', this.element).unbind('click.editorview');
34     this._super();
35   }
36 });