Author: piotr.buda
Date: 2008-11-04 06:27:53 -0500 (Tue, 04 Nov 2008)
New Revision: 11008
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
Log:
Resizable columns fixed for IE7 (bug with window resize #RF-4528)
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
---
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-11-04
11:21:36 UTC (rev 11007)
+++
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-11-04
11:27:53 UTC (rev 11008)
@@ -302,6 +302,8 @@
getScrollbarWidth: function() {
var sd = this.scrollingDiv.getElement();
+ LOG.debug("Scrolling Div offsetWidth: " + sd.offsetWidth);
+ LOG.debug("Scrolling Div clientWidth: " + sd.clientWidth);
return sd.offsetWidth - sd.clientWidth;
},
validateColumnsWidth: function(columns,excessWidth) {
@@ -394,6 +396,7 @@
newHeight -= this.header.getCaptionHeight();
scrollingDiv.setStyle('height:'+ newHeight +'px;');
header.adjustSeparators();
+ this.saveRatios();
this.hideSplashScreen();
},
@@ -403,8 +406,14 @@
saveRatios: function() {
LOG.debug('saveRatios');
var c = this.getColumns(); //table columns
- var scrollbarWidth = this.getScrollbarWidth(); //width of the scrollbar
- LOG.debug('Scrollbar: ' + scrollbarWidth);
+ var scrollbarWidth;
+ if(!this._scrollbarWidth) {
+ scrollbarWidth = this.getScrollbarWidth(); //width of the scrollbar
+ LOG.debug('Scrollbar: ' + scrollbarWidth);
+ } else {
+ scrollbarWidth = this._scrollbarWidth;
+ LOG.debug('Scrollbar (cache): ' + this._scrollbarWidth);
+ }
var mainDivWidth = this.mainDiv.getWidth(); //width of the whole div with table
LOG.debug('Main DIV: ' + mainDivWidth);
var maxWidth = mainDivWidth - scrollbarWidth; //max width of the table
@@ -425,6 +434,7 @@
LOG.debug('firing calculateWidthsFromRatios');
var c = this.getColumns(); //table columns
var scrollbarWidth = this.getScrollbarWidth(); //width of the scrollbar
+ this._scrollbarWidth = scrollbarWidth;
LOG.debug('Scrollbar: ' + scrollbarWidth);
var mainDivWidth = this.mainDiv.getWidth(); //width of the whole div with table
LOG.debug('Main DIV: ' + mainDivWidth);
Show replies by date