Author: konstantin.mishin
Date: 2007-12-29 13:51:42 -0500 (Sat, 29 Dec 2007)
New Revision: 5115
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/ScrollableGrid.js
Log:
RF-1592
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 2007-12-29
18:14:44 UTC (rev 5114)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-12-29
18:51:42 UTC (rev 5115)
@@ -68,13 +68,14 @@
this.currentScrollPos = 0;
this.controlCreated = true;
- this.updateLayout();
-
- if (ClientUILib.isIE && !ClientUILib.isIE7) {
- var grid = this;
- setTimeout(function() {grid.updateLayout()}, 50);
- }
+ var grid = this;
+ Utils.execOnLoad(
+ function(){
+ grid.updateLayout();
+ },
+ Utils.Condition.ElementPresent(grid.client_id), 100);
},
+
updateLayout: function($super) {
if(!this.controlCreated || this.getHeight()==0) {
return;
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
---
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-12-29
18:14:44 UTC (rev 5114)
+++
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-12-29
18:51:42 UTC (rev 5115)
@@ -16,39 +16,21 @@
{pane: GridLayout_Enum.BODY, ref: this.client_id +"_" +
"GridBodyTemplate"},
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" +
"GridFooterTemplate"}
];
- var grid = this;
- var s = $super;
- Utils.execOnLoad(
- function(){
- grid.init(s);
- },
- Utils.Condition.ElementPresent(grid.client_id), 100);
+ this.startCreateTime = (new Date()).getTime();
+
+ $super(this.client_id, this.dataModel, this.templates);
+
+ this.endCreateTime = (new Date()).getTime();
+ Event.observe(this.element, "grid:onsort",
this.onSorted.bindAsEventListener(this));
+ if (this.options.selectionInput) {
+ this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
+ }
+ this.getBody().restoreScrollState();
this.endInitTime = (new Date()).getTime();
this.rowCallbacks = [];
},
-
-// initialize parent Grid
- init: function(superCtor){
- // mark that grid control initialized
- if(!this.isInitialized) {
- this.isInitialized = true;
- this.startCreateTime = (new Date()).getTime();
-
- superCtor(this.client_id, this.dataModel, this.templates);
-
- this.endCreateTime = (new Date()).getTime();
-
- Event.observe(this.element, "grid:onsort",
this.onSorted.bindAsEventListener(this));
- if (this.options.selectionInput) {
- this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
- }
- this.element.fire("grid:initialized");
- this.getBody().restoreScrollState();
- }
- },
-
onSortComplete : function(request, event, data){
this.dataModel.count = $(this.client_id + "_rows_input").value;
var options = request.getJSON("options");
Show replies by date