Author: konstantin.mishin
Date: 2007-07-05 11:01:24 -0400 (Thu, 05 Jul 2007)
New Revision: 1481
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
RF-368
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-07-05
14:56:17 UTC (rev 1480)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-07-05
15:01:24 UTC (rev 1481)
@@ -118,12 +118,9 @@
//this.defaultWidth -= this.getBorderWidth("lr") +
this.getPadding("lr");
}
- if(ClientUILib.isIE) {
- this.frozenSubstrate = new ClientUI.common.box.Substrate(null, this.getElement());
- this.frozenSubstrate.getElement().name = this.getElement().id + "FRFrm";
- Element.addClassName(this.frozenSubstrate.getElement(), "ClientUI_HRFrm");
- this.frozenSubstrate.setHeight(this.defaultHeight);
- }
+ this.frozenSubstrate = new ClientUI.common.box.Box(this.grid.getElement().id +
":fs", this.getElement());
+ this.frozenSubstrate.getElement().name = this.getElement().id + "FRFrm";
+ this.frozenSubstrate.setHeight(this.defaultHeight);
return true;
},
updateSize: function() {
@@ -157,8 +154,7 @@
var viewWidth = this.grid.getBody().scrollBox.getViewportWidth();
this.container.setWidth(viewWidth);
this.setWidth(viewWidth);
- if(ClientUILib.isIE)
- this.frozenSubstrate.setWidth(frozenContentWidth);
+ this.frozenSubstrate.setWidth(frozenContentWidth);
},
adjustScrollPosition: function(pos) {
this.contentBox.moveToX(this.grid.getColumnsFrozenWidth()-pos);
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-05
14:56:17 UTC (rev 1480)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-05
15:01:24 UTC (rev 1481)
@@ -28,7 +28,7 @@
// constructor
initialize: function(template, grid) {
this.grid = grid;
-
+ this.gridId = this.grid.getElement().id;
ClientUI.controls.grid.GridHeader.parentClass.constructor().call(this, template);
// register event handlers
@@ -240,12 +240,9 @@
this.agjustSeparators();
- if(ClientUILib.isIE) {
- this.frozenSubstrate = new ClientUI.common.box.Substrate(null, this.getElement());
- this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
- Element.addClassName(this.frozenSubstrate.getElement(), "ClientUI_HRFrm");
- this.frozenSubstrate.setHeight(this.headerRow.getViewportHeight());
- }
+ 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.getViewportHeight());
return true;
},
@@ -321,8 +318,7 @@
this.frozenContentBox.setHeight(height);
this.frozenContentBox.moveTo(0, 0);
this.headerFrozenRow.setHeight(height);
- if(ClientUILib.isIE)
- this.frozenSubstrate.setWidth(frozenContentWidth);
+ this.frozenSubstrate.setWidth(frozenContentWidth);
},
getColumns: function() {
return this._columns;
@@ -394,7 +390,7 @@
}
},
_createSplitter: function() {
- this.columnSplitter = new ClientUI.common.box.Box(this.grid.getElement().id
+":cs", this.grid.getElement());
+ this.columnSplitter = new ClientUI.common.box.Box(this.gridId +":cs",
this.grid.getElement());
this.columnSplitter.makeAbsolute();
this.columnSplitter.setWidth(10);
this.columnSplitter.hide();
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-07-05
14:56:17 UTC (rev 1480)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-07-05
15:01:24 UTC (rev 1481)
@@ -33,7 +33,12 @@
{pane: GridLayout_Enum.BODY, ref: this.client_id +"_" +
"GridBodyTemplate"},
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" +
"GridFooterTemplate"}
];
- Event.observe(window, 'load', this.init.bindAsEventListener(this));
+ var grid = this;
+ Utils.execOnLoad(
+ function(){
+ grid.init();
+ },
+ Utils.Condition.ElementPresent(grid.client_id), 100);
this.endInitTime = (new Date()).getTime();
this.rowCallbacks = [];
@@ -59,8 +64,8 @@
this.eventOnPostSort = new ClientUI.common.utils.CustomEvent('OnSort');
this.eventOnPostScroll = new ClientUI.common.utils.CustomEvent('OnScroll');
- var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
- this.setProgressCtrl(progress);
+ //var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
+ //this.setProgressCtrl(progress);
Event.observe(this.eventOnSort, "on sort",
this.onSorted.bindAsEventListener(this));
if (this.options.selectionInput) {
this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-05
14:56:17 UTC (rev 1480)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-05
15:01:24 UTC (rev 1481)
@@ -325,6 +325,14 @@
/**
* Helper classes for grid template
*/
+.ClientUI_Substrate {
+ filter:Alpha(opacity=0);
+ position:absolute;
+ top:0px;
+ left:0px;
+ display:block;
+}
+
.ClientUI_TmplBox {
display: block;
float:left;
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-05
14:56:17 UTC (rev 1480)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-05
15:01:24 UTC (rev 1481)
@@ -30,6 +30,7 @@
<div id="#{clientId}" style="width:
#{component.attributes['width']};height:
#{component.attributes['height']};" class="ClientUI_Grid
#{component.attributes['styleClass']}" >
<div id="#{clientId}:cs" class="ClientUI_Grid_HSplit" />
<div id="#{clientId}_GridHeaderTemplate"
class="ClientUI_InlineBox" style="width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:hs" class="ClientUI_HRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" />
<div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:header:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
@@ -122,6 +123,7 @@
</div>
<div id="#{clientId}_GridFooterTemplate"
class="ClientUI_InlineBox" style="width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:fs" class="ClientUI_FRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" />
<div style="display: block; width: width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:footer:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">