From 4ef9f94e2465f7af40708a1cf3ee348bb7924473 Mon Sep 17 00:00:00 2001 From: zuber Date: Sun, 27 Sep 2009 13:11:13 +0200 Subject: [PATCH 1/1] =?utf8?q?Drobne=20poprawki=20wy=C5=9Bwietlania.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/static/js/models.js | 1 + project/static/js/views/view.js | 5 +++-- project/static/js/views/xml.js | 7 +++---- 3 files changed, 7 insertions(+), 6 deletions(-) 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) -- 2.20.1