- handle: function(event, data) {
- console.log('handle', this, event, data);
- if (event == 'text-changed') {
- this.freeze('Niezsynchronizowany');
- // this.unfreeze();
- } else if (event == 'xml-freeze') {
- this.freeze('Ładowanie XMLa...');
- } else if (event == 'xml-unfreeze') {
- this.editor.setCode(this.model.get('text'));
- this.unfreeze();
+ textDidChange: function(event) {
+ console.log('textDidChange!');
+ if (this.editor.getCode() != this.model.getData()) {
+ this.editor.setCode(this.model.getData());