Author: konstantin.mishin
Date: 2008-01-08 06:59:21 -0500 (Tue, 08 Jan 2008)
New Revision: 5173
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
merged scrollable-data-table with 3/1/x branch
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08
11:42:12 UTC (rev 5172)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08
11:59:21 UTC (rev 5173)
@@ -72,8 +72,6 @@
// create scroll box
this.scrollBox = new ClientUI.common.box.ScrollableBox(this.gridId + ":scb",
this.getElement());
- this.scrollBox.setWidth(this.getWidth());
- this.scrollBox.setHeight(this.getHeight());
this.sizeBox = new ClientUI.common.box.Box(this.gridId + ":sb",
this.scrollBox.getElement());
var normal = null, frozen = null;
@@ -184,7 +182,7 @@
var row = this.templNormal.getElement().rows[0];
if(row) {
- this.defaultRowHeight = row.cells[0].offsetHeigh;
+ this.defaultRowHeight = row.cells[0].offsetHeight;
}
//if(ClientUILib.isGecko) {
// this.defaultRowHeight -= this.getBorderWidth("tb") +
this.getPadding("tb");
@@ -201,11 +199,13 @@
var totalWidth = this.grid.getColumnsTotalWidth();
this.scrollBox.moveTo(0, 0);
- this.scrollBox.setWidth(this.getWidth());
- this.scrollBox.setHeight(this.getHeight());
+ var height = this.element.offsetHeight;
+ var width = this.element.offsetWidth;
+ this.scrollBox.setWidth(width);
+ this.scrollBox.setHeight(height);
+
var scrollLeft = this.grid.getScrollOffset();
- var height = this.scrollBox.getHeight();
var fixH = this.grid.getFooter() ? this.grid.getFooter().getHeight() : 0;
if(fixH > height) fixH = 0;
@@ -216,10 +216,8 @@
this.sizeBox.moveTo(0, 0);
this.sizeBox.setWidth(totalWidth);
- this.scrollBox.setWidth(this.getWidth()+1);
- this.scrollBox.setHeight(this.getHeight()+1);
- this.scrollBox.setWidth(this.getWidth());
- this.scrollBox.setHeight(this.getHeight());
+ this.scrollBox.setWidth(width);
+ this.scrollBox.setHeight(height);
height = this.scrollBox.getElement().clientHeight;
Show replies by date