fix for column autoresize on dblclick
This commit is contained in:
parent
a9d70eb348
commit
195975ce53
1 changed files with 4 additions and 5 deletions
|
@ -6440,7 +6440,6 @@ requires
|
||||||
|
|
||||||
$.extend(self, {
|
$.extend(self, {
|
||||||
columnPositions: [],
|
columnPositions: [],
|
||||||
columnWidths: [],
|
|
||||||
itemHeight: 16,
|
itemHeight: 16,
|
||||||
page: 0,
|
page: 0,
|
||||||
pageLength: 100,
|
pageLength: 100,
|
||||||
|
@ -6451,6 +6450,9 @@ requires
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
$.extend(self, {
|
$.extend(self, {
|
||||||
|
columnWidths: $.map(self.visibleColumns, function(v, i) {
|
||||||
|
return v.width;
|
||||||
|
}),
|
||||||
pageHeight: self.options.pageLength * self.itemHeight
|
pageHeight: self.options.pageLength * self.itemHeight
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6576,14 +6578,12 @@ requires
|
||||||
function constructHead() {
|
function constructHead() {
|
||||||
that.$titles = [];
|
that.$titles = [];
|
||||||
self.columnPositions = [];
|
self.columnPositions = [];
|
||||||
self.columnWidths = [];
|
|
||||||
$.each(self.visibleColumns, function(i, v) {
|
$.each(self.visibleColumns, function(i, v) {
|
||||||
var $order, $resize, $left, $center, $right, timeout = 0;
|
var $order, $resize, $left, $center, $right, timeout = 0;
|
||||||
self.columnWidths[i] = v.width;
|
|
||||||
that.$titles[i] = $('<div>')
|
that.$titles[i] = $('<div>')
|
||||||
.addClass('OxTitle OxColumn' + Ox.toTitleCase(v.id))
|
.addClass('OxTitle OxColumn' + Ox.toTitleCase(v.id))
|
||||||
.css({
|
.css({
|
||||||
width: (v.width - 9) + 'px',
|
width: (self.columnWidths[i] - 9) + 'px',
|
||||||
textAlign: v.align
|
textAlign: v.align
|
||||||
})
|
})
|
||||||
.html(v.title)
|
.html(v.title)
|
||||||
|
@ -6806,7 +6806,6 @@ requires
|
||||||
function resizeColumn(id, width) {
|
function resizeColumn(id, width) {
|
||||||
var i = getColumnIndexById(id),
|
var i = getColumnIndexById(id),
|
||||||
pos = getColumnPositionById(id);
|
pos = getColumnPositionById(id);
|
||||||
self.visibleColumns[pos].width = width;
|
|
||||||
self.columnWidths[pos] = width;
|
self.columnWidths[pos] = width;
|
||||||
that.$head.$content.css({
|
that.$head.$content.css({
|
||||||
width: (Ox.sum(self.columnWidths) + 2) + 'px'
|
width: (Ox.sum(self.columnWidths) + 2) + 'px'
|
||||||
|
|
Loading…
Reference in a new issue