fix for column autoresize on dblclick

This commit is contained in:
rolux 2010-09-05 23:36:51 +02:00
parent a9d70eb348
commit 195975ce53

View file

@ -6440,7 +6440,6 @@ requires
$.extend(self, {
columnPositions: [],
columnWidths: [],
itemHeight: 16,
page: 0,
pageLength: 100,
@ -6451,6 +6450,9 @@ requires
})
});
$.extend(self, {
columnWidths: $.map(self.visibleColumns, function(v, i) {
return v.width;
}),
pageHeight: self.options.pageLength * self.itemHeight
});
@ -6576,14 +6578,12 @@ requires
function constructHead() {
that.$titles = [];
self.columnPositions = [];
self.columnWidths = [];
$.each(self.visibleColumns, function(i, v) {
var $order, $resize, $left, $center, $right, timeout = 0;
self.columnWidths[i] = v.width;
that.$titles[i] = $('<div>')
.addClass('OxTitle OxColumn' + Ox.toTitleCase(v.id))
.css({
width: (v.width - 9) + 'px',
width: (self.columnWidths[i] - 9) + 'px',
textAlign: v.align
})
.html(v.title)
@ -6806,7 +6806,6 @@ requires
function resizeColumn(id, width) {
var i = getColumnIndexById(id),
pos = getColumnPositionById(id);
self.visibleColumns[pos].width = width;
self.columnWidths[pos] = width;
that.$head.$content.css({
width: (Ox.sum(self.columnWidths) + 2) + 'px'