From 134f920aba9916b5a97195f2a16ec62e72350e3b Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 6 Nov 2011 12:26:56 +0000 Subject: [PATCH] improvements related to list info editable element --- static/js/pandora/info.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/info.js b/static/js/pandora/info.js index 00d97f17..a8dcc17a 100644 --- a/static/js/pandora/info.js +++ b/static/js/pandora/info.js @@ -181,6 +181,11 @@ pandora.ui.listInfo = function() { }) .css({fontWeight: 'bold', textAlign: 'center'}) .bindEvent({ + edit: function() { + $title.options({ + width: that.width() + }); + }, submit: function(data) { if (data.value != item.name) { pandora.api.editList({ @@ -217,6 +222,17 @@ pandora.ui.listInfo = function() { }) .css({textAlign: 'center'}) .bindEvent({ + edit: function() { + // scrollbars may appear + setTimeout(function() { + var width = that.width(); + Ox.print('WIDTH', width, $description.options('width')) + $description.options({ + height: width, + width: width + }); + }, 25); + }, submit: function(data) { if (data.value != item.description) { pandora.api.editList({ @@ -254,14 +270,14 @@ pandora.ui.listInfo = function() { }; } that.resizeInfo = function() { + var width = that.width(); $icon.css(getIconCSS()); $title.options({ - width: that.width() - //width: pandora.user.ui.sidebarSize - 32 + width: width }); $description.options({ - height: that.height(), - width: that.width() + height: width, + width: width }); }; return that;