Author: konstantin.mishin
Date: 2007-07-31 13:05:19 -0400 (Tue, 31 Jul 2007)
New Revision: 1963
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-297
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-31
16:49:11 UTC (rev 1962)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-31
17:05:19 UTC (rev 1963)
@@ -740,5 +740,19 @@
for(var i=0; i<rows.length; i++) {
rows[i].removeChild(rows[i].cells[index]);
}
+ },
+
+ showRow: function(rowIndex) {
+ var row = $(this.gridId + ":f:" + rowIndex);
+ var offsetTop = this.fTable.offsetTop + row.offsetTop;
+ if(this.frozenContentBox.getElement().scrollTop > offsetTop) {
+ this.setScrollPos(offsetTop);
+ } else {
+ offsetTop += row.offsetHeight;
+ offsetTop -= this.frozenContentBox.getElement().clientHeight;
+ if (this.frozenContentBox.getElement().scrollTop < offsetTop){
+ this.setScrollPos(offsetTop);
+ }
+ }
}
});
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-07-31
16:49:11 UTC (rev 1962)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-07-31
17:05:19 UTC (rev 1963)
@@ -219,6 +219,7 @@
Object.extend(ClientUI.controls.grid.SelectionManager.prototype, {
initialize: function(grid) {
+ this.grid = grid;
this.selectionFlag;
this.firstIndex;
var gridElement = grid.getElement();
@@ -388,6 +389,7 @@
this.lostFocus();
}
if (noDefault) {
+ this.grid.getBody().showRow(this.activeRow);
this.selectionChanged(event);
if (event.preventBubble) event.preventBubble();
Event.stop(event);
Show replies by date