Author: konstantin.mishin
Date: 2008-01-08 13:51:31 -0500 (Tue, 08 Jan 2008)
New Revision: 5199
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
Log:
RF-726
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -77,13 +77,13 @@
},
updateLayout: function($super) {
- if(!this.controlCreated || this.getHeight()==0) {
+ if(!this.controlCreated || this.element.offsetHeight==0) {
return;
}
$super();
var header = this.getHeader();
- if(header.getHeight() == 0) {
+ if(header.element.offsetHeight == 0) {
header.updateSize();
this.getBody().updateSize();
if(this.getFooter()) {this.getFooter().updateSize();}
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -51,8 +51,8 @@
window.loadingInvalidateTime = (new Date()).getTime();
},
_onContentVScroll: function(event) {
- this.helpObject1.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
- this.helpObject2.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
+ this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
+ this.helpObject2.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
this.setScrollPos(event.memo.pos);
this.adjustDataPosition(event.memo.pos);
},
@@ -206,7 +206,7 @@
this.scrollBox.setHeight(height);
var scrollLeft = this.grid.getScrollOffset();
- var fixH = this.grid.getFooter() ? this.grid.getFooter().getHeight() : 0;
+ var fixH = this.grid.getFooter() ? this.grid.getFooter().element.offsetHeight : 0;
if(fixH > height) fixH = 0;
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
@@ -229,10 +229,10 @@
this.defaultRowHeight = this._calcDefaultRowHeight();
this.scrollBox.hide();
this.sizeBox.setHeight(this.defaultRowHeight * this.grid.dataModel.getCount() + fixH);
- this.helpObject1.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
- this.helpObject2.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
+ this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
+ this.helpObject2.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
- this.dataVisible = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) +
1;
+ this.dataVisible = parseInt(this.contentBox.element.offsetHeight /
this.defaultRowHeight, 10) + 1;
this.dataVisible = Math.min(this.dataVisible, this.rowsCount);
if(height > 0) {
this.adjustDataPosition(this.currentPos);
@@ -709,7 +709,7 @@
ensureVisible: function (index) {
if(index>=0 && index<this.grid.dataModel.getCount()) {
- var visibleRows = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) +
1;
+ var visibleRows = parseInt(this.contentBox.element.offsetHeight /
this.defaultRowHeight, 10) + 1;
if(this.grid.dataModel.getCount() > visibleRows) {
var y = index*this.defaultRowHeight;
this.scrollBox.getElement().scrollTop = y;
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -129,7 +129,7 @@
}
$super();
- var height = this.getHeight();
+ var height = this.element.offsetHeight;
var totalWidth = this.grid.getColumnsTotalWidth();
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -222,7 +222,7 @@
this.frozenSubstrate = new ClientUI.common.box.Box(this.gridId + ":hs",
this.getElement());
this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
- this.frozenSubstrate.setHeight(this.headerRow.getHeight());
+ this.frozenSubstrate.setHeight(this.headerRow.element.offsetHeight);
return true;
},
@@ -293,7 +293,7 @@
return;
}
$super();
- var height = this.getHeight();
+ var height = this.element.offsetHeight;
var totalWidth = this.grid.getColumnsTotalWidth();
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
@@ -372,7 +372,7 @@
}
this.dragColumnInfo.originalX = pos;
this.columnSplitter.show();
- this.columnSplitter.setHeight(this.defaultHeight +
this.grid.getBody().contentBox.getHeight());
+ this.columnSplitter.setHeight(this.defaultHeight +
this.grid.getBody().contentBox.element.offsetHeight);
this.columnSplitter.moveTo(pos, 0);
},
_hideSplitter: function() {
@@ -437,7 +437,7 @@
if (icon) {
var newPosX = div.clientWidth - icon.getWidth();
- var newPosY = (div.clientHeight - icon.getHeight())/2;
+ var newPosY = (div.clientHeight - icon.offsetHeight)/2;
newPosX = Math.floor(newPosX);
newPosY = Math.floor(newPosY);
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -30,7 +30,7 @@
var parentBox = this.getContainer();
if(parentBox==null) parentBox = this;
- var height = parentBox.getHeight();
+ var height = parentBox.element.offsetHeight;
var width = parentBox.getViewportWidth();
// NOTE: not implemented in this class
@@ -41,7 +41,7 @@
// first get size of header
if(this.panels[GridLayout_Enum.HEADER]) {
- headerHeight = this.panels[GridLayout_Enum.HEADER].getHeight();
+ headerHeight = this.panels[GridLayout_Enum.HEADER].element.offsetHeight;
this.panels[GridLayout_Enum.HEADER].moveTo(0, 0);
this.panels[GridLayout_Enum.HEADER].setWidth(width);
this.panels[GridLayout_Enum.HEADER].updateLayout();
@@ -58,7 +58,7 @@
}
if(this.panels[GridLayout_Enum.FOOTER]) {
- footerHeight = this.panels[GridLayout_Enum.FOOTER].getHeight();
+ footerHeight = this.panels[GridLayout_Enum.FOOTER].element.offsetHeight;
this.panels[GridLayout_Enum.FOOTER].moveTo(0, bodyBottom - footerHeight);
this.panels[GridLayout_Enum.FOOTER].setWidth(width);
this.panels[GridLayout_Enum.FOOTER].updateLayout();
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -37,7 +37,7 @@
updateLayout: function($super) {
if(this.container) {
var w = this.container.getWidth();
- var h = this.container.getHeight();
+ var h = this.container.element.offsetHeight;
if(ClientUILib.isGecko) {
w -= this.container.getBorderWidth("lr") +
this.container.getPadding("lr");
h -= this.container.getBorderWidth("tb") +
this.container.getPadding("tb");
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2008-01-08
18:43:35 UTC (rev 5198)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2008-01-08
18:51:31 UTC (rev 5199)
@@ -50,7 +50,7 @@
var parentBox = this.getContainer();
if(!parentBox) parentBox = this;
- var height = parentBox.getHeight();
+ var height = parentBox.element.offsetHeight;
var width = parentBox.getViewportWidth();
if(ClientUILib.isGecko) {
width -= parentBox.getBorderWidth("lr") +
parentBox.getPadding("lr");
@@ -64,13 +64,13 @@
// first get size of header
if(this.panels[GridLayout_Enum.HEADER]) {
- headerHeight = this.panels[GridLayout_Enum.HEADER].getHeight();
+ headerHeight = this.panels[GridLayout_Enum.HEADER].element.offsetHeight;
this.panels[GridLayout_Enum.HEADER].moveTo(0, 0);
this.panels[GridLayout_Enum.HEADER].setWidth(width);
this.panels[GridLayout_Enum.HEADER].updateLayout();
}
if(this.panels[GridLayout_Enum.FOOTER]) {
- footerHeight = this.panels[GridLayout_Enum.FOOTER].getHeight();
+ footerHeight = this.panels[GridLayout_Enum.FOOTER].element.offsetHeight;
this.panels[GridLayout_Enum.FOOTER].moveTo(0, height - footerHeight);
this.panels[GridLayout_Enum.FOOTER].setWidth(width);
this.panels[GridLayout_Enum.FOOTER].updateLayout();