Author: dmorozov
Date: 2007-06-12 11:39:45 -0400 (Tue, 12 Jun 2007)
New Revision: 1141
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Rollback changes
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-12
15:15:25 UTC (rev 1140)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-12
15:39:45 UTC (rev 1141)
@@ -659,7 +659,7 @@
state.setFrozenColumnCount(GridUtils.getFrozenColumnsCount(grid));
ColumnWalker.iterateOverColumns(context, grid, columnsWidthCounter, null, state);
ComponentVariables variables = ComponentsVariableResolver.getVariables(this, grid);
- int sumWidth = state.getSumWidth() + 1020;
+ int sumWidth = state.getSumWidth() + 200;
variables.setVariable("sumWidth", new Integer(sumWidth));
}
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-12
15:15:25 UTC (rev 1140)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-12
15:39:45 UTC (rev 1141)
@@ -98,10 +98,12 @@
}
src = row;
+ target.parentNode.replaceChild(src, target);
} else {
-
- src = document.importNode(src, true);
+ target.innerHTML = src.innerHTML;
+ src = target;
+ //src = document.importNode(src, true);
}
@@ -110,7 +112,6 @@
//src = importProvider.importNode(src, true);
- target.parentNode.replaceChild(src, target);
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-12
15:15:25 UTC (rev 1140)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-12
15:39:45 UTC (rev 1141)
@@ -7,7 +7,7 @@
ClientUILib.requireClass("ClientUI.common.box.Box");
ClientUILib.requireClass("ClientUI.common.box.SplashBox");
-ClientUILib.requireClass("ClientUI.controls.grid.DataCash");
+//ClientUILib.requireClass("ClientUI.controls.grid.DataCash");
/*
* GridHeader.js - Grid control header pane
@@ -166,13 +166,13 @@
this.parseTemplate(this.templFrozen.getElement(), this.templNormal.getElement());
// init cash with initial data
- var cash = this.getCash();
+ /*var cash = this.getCash();
var frows = this.templFrozen.getElement().rows;
var nrows = this.templNormal.getElement().rows;
var count = this.rowsCount;
for(var i=0; i<count; i++) {
cash.setRow(i, {f: frows[i].innerHTML, n: nrows[i].innerHTML});
- }
+ }*/
this.controlCreated = true;
},
@@ -494,7 +494,7 @@
rearrangeRows: function(options, updateCash, showContainer) {
var frozenTbl = this.templFrozen.getElement();
var normalTbl = this.templNormal.getElement();
- var cash = this.getCash();
+ //var cash = this.getCash();
if(options.switchType === 0) {
var visibleRowPos = this.defaultRowHeight * options.index;
@@ -503,7 +503,7 @@
this.templFrozen.moveToY(visibleRowPos);
this.templNormal.moveToY(visibleRowPos);
- if(updateCash) {
+ /*if(updateCash) {
var frows = frozenTbl.rows;
var nrows = normalTbl.rows;
var count = frows.length;
@@ -511,7 +511,7 @@
for(var i=0; i<count; i++) {
cash.setRow(index+i, {f: frows[i].innerHTML, n: nrows[i].innerHTML});
}
- }
+ }*/
this.forceReRender();
}
@@ -531,9 +531,9 @@
for(i=0; i<options.count; i++) {
frows[j] = frozenTbl.rows[i];
nrows[j] = normalTbl.rows[i];
- if(updateCash) {
+ /*if(updateCash) {
cash.setRow(index+i, {f: frows[j].innerHTML, n: nrows[j].innerHTML});
- }
+ }*/
j++;
}
}
@@ -541,9 +541,9 @@
for(i=this.rowsCount - options.count; i<this.rowsCount; i++) {
frows[j] = frozenTbl.rows[i];
nrows[j] = normalTbl.rows[i];
- if(updateCash) {
+ /*if(updateCash) {
cash.setRow(index+j, {f: frows[j].innerHTML, n: nrows[j].innerHTML});
- }
+ }*/
j++;
}
for(i=0; i<this.rowsCount - options.count; i++) {
@@ -586,7 +586,7 @@
this.templNormal.moveToY(visibleRowPos);
}
else {
- if(updateCash) {
+ /*if(updateCash) {
var frows = frozenTbl.rows;
var nrows = normalTbl.rows;
var count = frows.length;
@@ -594,7 +594,7 @@
for(var i=0; i<count; i++) {
cash.setRow(index+i, {f: frows[i].innerHTML, n: nrows[i].innerHTML});
}
- }
+ }*/
var visibleRowPos = this.currRange.start * this.defaultRowHeight;
if(showContainer) this._showContainer();
this.templFrozen.moveToY(visibleRowPos);
@@ -640,7 +640,7 @@
this.adjustDataPosition(this.processedPos);
}
},*/
- getCash: function() {
+ /*getCash: function() {
if(!this.cash) {
this.cash = new ClientUI.controls.grid.DataCash(this.grid.dataModel.getCount());
}
@@ -680,7 +680,7 @@
this.updateStarted = false;
}.bind(this), 10);
- },
+ },*/
processCashedValues: function(options) {
return options;
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-06-12 15:15:25
UTC (rev 1140)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-06-12 15:39:45
UTC (rev 1141)
@@ -201,7 +201,7 @@
}
};
-ClientUILib.load(true);
+ClientUILib.load();
// declare predefined packages
var ClientUI = {
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-12
15:15:25 UTC (rev 1140)
+++
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-12
15:39:45 UTC (rev 1141)
@@ -60,7 +60,7 @@
renderCols(context, component, false);
]]>
</jsp:scriptlet>
- <col width="1000px" />
+ <col width="100px" />
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -68,7 +68,7 @@
renderHeaders(context, component, false);
]]>
</jsp:scriptlet>
- <td style="width: 1000px"></td>
+ <td style="width: 100px"></td>
</tr>
</tbody>
</table>