fix for column resize after column add/remove
This commit is contained in:
parent
9241b3e66c
commit
a9d70eb348
1 changed files with 5 additions and 3 deletions
|
@ -6529,6 +6529,7 @@ requires
|
|||
});
|
||||
column.visible = true;
|
||||
self.visibleColumns.splice(index, 0, column);
|
||||
self.columnWidths.splice(index, 0, column.width);
|
||||
that.$head.$content.empty();
|
||||
constructHead();
|
||||
that.$body.options({
|
||||
|
@ -6770,6 +6771,7 @@ requires
|
|||
Ox.print('removeColumn', id);
|
||||
var className = '.OxColumn' + Ox.toTitleCase(id),
|
||||
index = getColumnIndexById(id),
|
||||
itemWidth,
|
||||
position = getColumnPositionById(id),
|
||||
$column = $('.OxTitle' + className),
|
||||
$order = $column.next(),
|
||||
|
@ -6777,10 +6779,9 @@ requires
|
|||
self.options.columns[index].visible = false;
|
||||
self.visibleColumns.splice(position, 1);
|
||||
self.columnWidths.splice(position, 1);
|
||||
that.$head.$content.empty();
|
||||
constructHead();
|
||||
itemWidth = getItemWidth();
|
||||
$column.remove();
|
||||
$order.remove();
|
||||
$resize.remove();
|
||||
$.each(that.$body.find('.OxItem'), function(i, v) {
|
||||
var $v = $(v);
|
||||
$v.children(className).remove();
|
||||
|
@ -6805,6 +6806,7 @@ 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'
|
||||
|
|
Loading…
Reference in a new issue