improvements related to list info editable element

This commit is contained in:
rolux 2011-11-06 12:26:56 +00:00
parent 61e6e097be
commit 134f920aba

View file

@ -181,6 +181,11 @@ pandora.ui.listInfo = function() {
}) })
.css({fontWeight: 'bold', textAlign: 'center'}) .css({fontWeight: 'bold', textAlign: 'center'})
.bindEvent({ .bindEvent({
edit: function() {
$title.options({
width: that.width()
});
},
submit: function(data) { submit: function(data) {
if (data.value != item.name) { if (data.value != item.name) {
pandora.api.editList({ pandora.api.editList({
@ -217,6 +222,17 @@ pandora.ui.listInfo = function() {
}) })
.css({textAlign: 'center'}) .css({textAlign: 'center'})
.bindEvent({ .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) { submit: function(data) {
if (data.value != item.description) { if (data.value != item.description) {
pandora.api.editList({ pandora.api.editList({
@ -254,14 +270,14 @@ pandora.ui.listInfo = function() {
}; };
} }
that.resizeInfo = function() { that.resizeInfo = function() {
var width = that.width();
$icon.css(getIconCSS()); $icon.css(getIconCSS());
$title.options({ $title.options({
width: that.width() width: width
//width: pandora.user.ui.sidebarSize - 32
}); });
$description.options({ $description.options({
height: that.height(), height: width,
width: that.width() width: width
}); });
}; };
return that; return that;