From 3c7b27992f89ce11dfe8c2576c6f82f182e771d2 Mon Sep 17 00:00:00 2001 From: zuber Date: Fri, 28 Aug 2009 10:45:52 +0200 Subject: [PATCH 1/1] =?utf8?q?Zapisywanie=20i=20odczytywanie=20ustawie?= =?utf8?q?=C5=84=20paneli=20z=20cookie.=20Potrzebne=20jest=20jeszcze=20ust?= =?utf8?q?awianie=20cookie=20przy=20zalogowaniu=20i=20drobny=20refaktoring?= =?utf8?q?.=20Refs=20#49.?= 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 | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/project/static/js/editor.js b/project/static/js/editor.js index 23fab855..8d755254 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -123,7 +123,9 @@ Editor.prototype.setupUI = function() { }); totalWidth += panelWidth; } - $('.panel-toolbar select', this).val(self.options.panels[index].url); + $('.panel-toolbar select', this).val( + $('.panel-toolbar option[name=' + self.options.panels[index].name + ']', this).attr('value') + ) }); } @@ -143,7 +145,7 @@ Editor.prototype.setupUI = function() { var panels = []; $('.panel-wrap', panelRoot).not('.panel-content-overlay').each(function(index) { panels.push({ - url: $('.panel-toolbar select', this).val(), + name: $('.panel-toolbar option:selected', this).attr('name'), ratio: $(this).width() / panelRoot.width() }) }); @@ -153,15 +155,13 @@ Editor.prototype.setupUI = function() { }); }); - $('.panel-toolbar').val() $('#toolbar-button-save').click( function (event, data) { self.saveToBranch(); } ); panelRoot.bind('stopResize', function() { var panels = []; $('.panel-wrap', panelRoot).not('.panel-content-overlay').each(function() { - console.log($(this), $(this).data('ctrl')); panels.push({ - url: $('.panel-toolbar select', this).val(), + name: $('.panel-toolbar option:selected', this).attr('name'), ratio: $(this).width() / panelRoot.width() }) }); @@ -179,8 +179,8 @@ Editor.prototype.loadConfig = function() { } catch (e) { this.options = { panels: [ - {url: '/editor/panel/htmleditor/', ratio: 0.5}, - {url: '/editor/panel/gallery/', ratio: 0.5} + {name: 'htmleditor', ratio: 0.5}, + {name: 'gallery', ratio: 0.5} ] } } diff --git a/project/templates/explorer/editor.html b/project/templates/explorer/editor.html index 1e0cf30b..dd5c736f 100644 --- a/project/templates/explorer/editor.html +++ b/project/templates/explorer/editor.html @@ -22,10 +22,10 @@
@@ -36,10 +36,10 @@
-- 2.20.1