From: zuber <marek@stepniowski.com>
Date: Sun, 27 Sep 2009 11:11:13 +0000 (+0200)
Subject: Drobne poprawki wyƛwietlania.
X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/4ef9f94e2465f7af40708a1cf3ee348bb7924473?hp=f46d9319a26b5cf74fcf5aa24a5a8df18f1bda74

Drobne poprawki wyƛwietlania.
---

diff --git a/project/static/js/models.js b/project/static/js/models.js
index 97682d02..5c5e6fb1 100644
--- a/project/static/js/models.js
+++ b/project/static/js/models.js
@@ -11,6 +11,7 @@ Editor.Model = Editor.Object.extend({
 Editor.XMLModel = Editor.Model.extend({
   _className: 'Editor.XMLModel',
   serverURL: null,
+  data: '',
   
   init: function(serverURL) {
     this._super();
diff --git a/project/static/js/views/view.js b/project/static/js/views/view.js
index a21ba1ef..52fc6e04 100644
--- a/project/static/js/views/view.js
+++ b/project/static/js/views/view.js
@@ -58,15 +58,16 @@ var View = Editor.Object.extend({
   },
 
   resized: function(event) {
-    console.log('resized', this.description(), this.element);
     if (this.frozen()) {
-      console.log('css!');
       this.overlay.css({
         position: 'absolute',
         width: this.element.width(),
         height: this.element.height(),
         top: this.element.position().top,
         left: this.element.position().left
+      }).children('div').css({
+        position: 'relative',
+        top: this.overlay.height() / 2 - 20
       });
     }
   },
diff --git a/project/static/js/views/xml.js b/project/static/js/views/xml.js
index 9de8d2a1..fd670401 100644
--- a/project/static/js/views/xml.js
+++ b/project/static/js/views/xml.js
@@ -33,14 +33,13 @@ var XMLView = View.extend({
       .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();
-    } else {
-      this.editor.setCode(this.model.get('data'));
     }
-  
+    
     // editor.grabKeys(
     //   $.fbind(self, self.hotkeyPressed),
     //   $.fbind(self, self.isHotkey)