Drobne poprawki wyƛwietlania.
authorzuber <marek@stepniowski.com>
Sun, 27 Sep 2009 11:11:13 +0000 (13:11 +0200)
committerzuber <marek@stepniowski.com>
Sun, 27 Sep 2009 11:11:13 +0000 (13:11 +0200)
project/static/js/models.js
project/static/js/views/view.js
project/static/js/views/xml.js

index 97682d0..5c5e6fb 100644 (file)
@@ -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();
index a21ba1e..52fc6e0 100644 (file)
@@ -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
       });
     }
   },
index 9de8d2a..fd67040 100644 (file)
@@ -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)