Author: konstantin.mishin
Date: 2007-10-29 13:40:12 -0400 (Mon, 29 Oct 2007)
New Revision: 3602
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
RF-1107
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-10-29
14:48:59 UTC (rev 3601)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-10-29
17:40:12 UTC (rev 3602)
@@ -94,6 +94,7 @@
break;
}
}
+ Event.observe(this.container.getElement(), 'scroll',
this.synchronizeHScroll.bindAsEventListener(this));
// create scroll box
this.scrollBox = new ClientUI.common.box.ScrollableBox(this.gridId + ":scb",
this.getElement());
@@ -120,6 +121,7 @@
this.contentBox = new ClientUI.common.box.Box(normal);
this.contentBox.makeAbsolute();
+ Event.observe(this.contentBox.getElement(), 'scroll',
this.synchronizeVScroll.bindAsEventListener(this));
this.frozenContentBox = new ClientUI.common.box.Box(frozen);
this.frozenContentBox.makeAbsolute();
@@ -808,5 +810,13 @@
this.templFrozen.moveToY(visibleRowPos);
this.templNormal.moveToY(visibleRowPos);
}
+ },
+
+ synchronizeHScroll: function() {
+ this.container.getElement().scrollLeft = 0;
+ },
+
+ synchronizeVScroll: function() {
+ this.contentBox.getElement().scrollTop = 0;
}
});
Show replies by date