From 78b3d0dc3fc979d4c2ab507bf95d82b89e2792ad Mon Sep 17 00:00:00 2001 From: zuber Date: Thu, 10 Sep 2009 16:21:31 +0200 Subject: [PATCH] =?utf8?q?Fix=20#102:=20Nie=20mo=C5=BCna=20zmieni=C4=87=20?= =?utf8?q?domy=C5=9Blnych=20paneli.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/static/js/editor.js | 14 ++++++++------ project/templates/explorer/editor.html | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/project/static/js/editor.js b/project/static/js/editor.js index ac34ac5a..11574373 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -268,7 +268,7 @@ Editor.prototype.setupUI = function() { var self = this; self.rootDiv.makeHorizPanel({}); // TODO: this probably doesn't belong into jQuery - // self.rootDiv.css('top', ($('#header').outerHeight() ) + 'px'); + // self.rootcDiv.css('top', ($('#header').outerHeight() ) + 'px'); $('#panels > *.panel-wrap').each(function() { var panelWrap = $(this); @@ -279,8 +279,8 @@ Editor.prototype.setupUI = function() { $('.panel-toolbar select', panelWrap).change(function() { var url = $(this).val(); - panelWrap.data('ctrl').load(url); self.savePanelOptions(); + panelWrap.data('ctrl').load(url); }); $('.panel-toolbar button.refresh-button', panelWrap).click( @@ -367,9 +367,11 @@ Editor.prototype.loadPanelOptions = function() { totalWidth += panelWidth; } $.log('panel:', this, $(this).css('left')); - $('.panel-toolbar select', this).val( - $('.panel-toolbar option[name=' + self.options.panels[index].name + ']', this).attr('value') - ) + $('.panel-toolbar option', this).each(function() { + if ($(this).attr('p:panel-name') == self.options.panels[index].name) { + $(this).parent('select').val($(this).attr('value')); + } + }); }); } @@ -378,7 +380,7 @@ Editor.prototype.savePanelOptions = function() { var panels = []; $('.panel-wrap', self.rootDiv).not('.panel-content-overlay').each(function() { panels.push({ - name: $('.panel-toolbar option:selected', this).attr('name'), + name: $('.panel-toolbar option:selected', this).attr('p:panel-name'), ratio: $(this).width() / self.rootDiv.width() }) }); diff --git a/project/templates/explorer/editor.html b/project/templates/explorer/editor.html index 891366b7..2aaf26e9 100644 --- a/project/templates/explorer/editor.html +++ b/project/templates/explorer/editor.html @@ -61,7 +61,7 @@

-- 2.20.1