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'})
.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;