Author: konstantin.mishin
Date: 2008-01-10 08:28:10 -0500 (Thu, 10 Jan 2008)
New Revision: 5260
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/GridHeader.js
Log:
RF-1799
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-10
12:33:37 UTC (rev 5259)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-10
13:28:10 UTC (rev 5260)
@@ -370,21 +370,20 @@
}
if(switchType === 0) {
- startRowIndx = this._getRowIndex(this.templFrozen.getElement().rows[0].id);
+ startRowIndx = this._getRowIndex(this.templNormal.getElement().rows[0].id);
startIndex = range.start;
countToLoad = range.end - range.start;
}
else {
var i, row, rownew, cloned;
countToLoad = 0;
- var frozenTbl = this.templFrozen.getElement();
var normalTbl = this.templNormal.getElement();
if(range.start > this.currRange.start
&& range.start < this.currRange.end) {
switchType = 1;
countToLoad = range.start - this.currRange.start;
if(countToLoad > 0) {
- startRowIndx = this._getRowIndex(frozenTbl.rows[0].id);
+ startRowIndx = this._getRowIndex(normalTbl.rows[0].id);
startIndex = this.currRange.end;
}
}
@@ -394,7 +393,7 @@
if(countToLoad > 0) {
startIndex = this.currRange.end;
var restCount = this.rowsCount - countToLoad;
- startRowIndx = this._getRowIndex(frozenTbl.rows[restCount].id);
+ startRowIndx = this._getRowIndex(normalTbl.rows[restCount].id);
}
}
else {
@@ -403,7 +402,7 @@
if(countToLoad > 0) {
startIndex = range.start;
var restCount = this.rowsCount - countToLoad;
- startRowIndx = this._getRowIndex(frozenTbl.rows[restCount].id);
+ startRowIndx = this._getRowIndex(normalTbl.rows[restCount].id);
}
}
}
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-10
12:33:37 UTC (rev 5259)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-10
13:28:10 UTC (rev 5260)
@@ -261,24 +261,24 @@
},
updateSize: function() {
var defaultWidth = 0, defaultHeight = 0;
- var i = 0, h, j=0;
+ var i = 0, h;
var columns = this._columns;
var cols =
$A(this.headerFrozenRow.getElement().getElementsByTagName("col"));
- var cells = $A(this.headerFrozenRow.getElement().rows[0].cells);
- cells.each(function(cell) {
+ var count = this.frozenCells.length;
+ for(j=0; j<count; j++) {
+ cell = this.frozenCells[j];
if(i<columns.length) {
columns[i].width = parseInt(cols[j].width);
h = cell.offsetHeight;
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[i].width;
}
- i++;j++;
- });
-
- j=0;
+ i++;
+ }
cols = $A(this.headerRow.getElement().getElementsByTagName("col"));
- cells = $A(this.headerRow.getElement().rows[0].cells);
- cells.each(function(cell) {
+ count = this.cells.length;
+ for(j=0; j<count; j++) {
+ cell = this.cells[j];
if(i<columns.length) {
columns[i].width = parseInt(cols[j].width);
@@ -286,8 +286,8 @@
if(h > defaultHeight) defaultHeight = h;
defaultWidth += columns[i].width;
}
- i++;j++;
- });
+ i++;
+ }
this.defaultHeight = defaultHeight;
this.defaultWidth = defaultWidth;
Show replies by date