fix lists resize bug

This commit is contained in:
rlx 2011-01-13 21:17:48 +00:00
parent d529ea7aff
commit 4428ad4d5c
2 changed files with 17 additions and 11 deletions

View file

@ -878,7 +878,6 @@ Lists
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
overflow-y: scroll;
} }
.OxTextList .OxBody .OxContent { .OxTextList .OxBody .OxContent {
//width: 100%; //width: 100%;

View file

@ -7358,7 +7358,7 @@ requires
.addClass('OxBody') .addClass('OxBody')
.css({ .css({
top: (self.options.columnsVisible ? 16 : 0) + 'px', top: (self.options.columnsVisible ? 16 : 0) + 'px',
overflowY: (self.options.columnsVisible ? 'scroll' : 'auto') overflowY: (self.options.columnsVisible ? 'scroll' : 'hidden')
}) })
.scroll(function() { .scroll(function() {
var scrollLeft = $(this).scrollLeft(); var scrollLeft = $(this).scrollLeft();
@ -7642,7 +7642,11 @@ requires
} }
function getItemWidth() { function getItemWidth() {
return Math.max(Ox.sum(self.columnWidths), that.$element.width() - oxui.scrollbarSize); return Math.max(
Ox.sum(self.columnWidths),
that.$element.width() -
(self.options.columnsVisible ? oxui.scrollbarSize : 0)
);
//return Ox.sum(self.columnWidths) //return Ox.sum(self.columnWidths)
} }
@ -7711,15 +7715,18 @@ requires
function resizeColumn(id, width) { function resizeColumn(id, width) {
var i = getColumnIndexById(id), var i = getColumnIndexById(id),
pos = getColumnPositionById(id); pos = getColumnPositionById(id);
self.options.columns[i].width = width;
self.columnWidths[pos] = width; self.columnWidths[pos] = width;
that.$head.$content.css({ if (self.options.columnsVisible) {
width: (Ox.sum(self.columnWidths) + 2) + 'px' that.$head.$content.css({
}); width: (Ox.sum(self.columnWidths) + 2) + 'px'
that.$titles[pos].css({ });
width: (width - 9 - (i == self.selectedColumn ? 16 : 0)) + 'px' that.$titles[pos].css({
}); width: (width - 9 - (i == self.selectedColumn ? 16 : 0)) + 'px'
$('.OxCell.OxColumn' + Ox.toTitleCase(self.options.columns[i].id)).css({ });
width: (width - 9) + 'px' }
that.find('.OxCell.OxColumn' + Ox.toTitleCase(self.options.columns[i].id)).css({
width: (width - (self.options.columnsVisible ? 9 : 8)) + 'px'
}); });
setWidth(); setWidth();
//that.$body.clearCache(); //that.$body.clearCache();