- codeChanged: function() {
- console.log('setCode:', this.editor, this.model);
- this.editor.setCode(this.model.xml);
- this.unfreeze();
+ 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();
+ }