1 /*global View render_template panels */
2 var HTMLView = View.extend({
5 template: 'html-view-template',
7 init: function(element, model, template) {
8 this._super(element, model, template);
11 .addObserver(this, 'data', this.modelDataChanged.bind(this))
12 .addObserver(this, 'synced', this.modelSyncChanged.bind(this));
14 if (!this.model.get('synced')) {
15 this.freeze('Niezsynchronizowany...');
18 $('.htmlview', this.element).html(this.model.get('data'));
22 modelDataChanged: function(property, value) {
23 $('.htmlview', this.element).html(value);
26 modelSyncChanged: function(property, value) {
30 this.freeze('Niezsynchronizowany...');
35 this.model.removeObserver(this);
41 panels['html'] = HTMLView;