Merge branch 'master' into view-refactor
[redakcja.git] / project / static / js / views / xml.js
index 9de8d2a..fd67040 100644 (file)
@@ -33,14 +33,13 @@ var XMLView = View.extend({
       .addObserver(this, 'synced', this.modelSyncChanged.bind(this));
     
     this.parent.unfreeze();
       .addObserver(this, 'synced', this.modelSyncChanged.bind(this));
     
     this.parent.unfreeze();
-        
+      
+    this.editor.setCode(this.model.get('data'));
     if (!this.model.get('synced')) {
       this.parent.freeze('Niezsynchronizowany...');
       this.model.load();
     if (!this.model.get('synced')) {
       this.parent.freeze('Niezsynchronizowany...');
       this.model.load();
-    } else {
-      this.editor.setCode(this.model.get('data'));
     }
     }
-  
+    
     // editor.grabKeys(
     //   $.fbind(self, self.hotkeyPressed),
     //   $.fbind(self, self.isHotkey)
     // editor.grabKeys(
     //   $.fbind(self, self.hotkeyPressed),
     //   $.fbind(self, self.isHotkey)