From 8cc347d93e1c0d4c37ff3ea1e6b8df16891882b3 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 5 Sep 2010 23:36:51 +0200 Subject: [PATCH] fix for column autoresize on dblclick --- build/js/ox.ui.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 2ba8090..39dd91e 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -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] = $('
') .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'