Author: dmorozov
Date: 2007-07-05 12:39:00 -0400 (Thu, 05 Jul 2007)
New Revision: 1484
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
Add TD style copying while update DOM model
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-05
15:42:21 UTC (rev 1483)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-05
16:39:00 UTC (rev 1484)
@@ -59,21 +59,16 @@
for(var k=0; k<tcount; k++) {
tdSrc = k<ccount ? childs[k] : null;
tdNode = theDoc.createElement( "TD" );
- tdNode.className = "ClientUI_Grid_BC";
+ tdNode.className = target.childNodes[k].className;
if(tdSrc) {
- if(tdSrc.innerHTML) {
- tdNode.innerHTML = tdSrc.innerHTML;
+ innerHTML = [];
+ innerCount = tdSrc.childNodes.length;
+ for(j=0; j<innerCount; j++) {
+ subNode = tdSrc.childNodes[j];
+ innerHTML.push(subNode.xml);
}
- else {
- innerHTML = [];
- innerCount = tdSrc.childNodes.length;
- for(j=0; j<innerCount; j++) {
- subNode = tdSrc.childNodes[j];
- innerHTML.push(subNode.xml);
- }
- tdNode.innerHTML = innerHTML.join("");
- }
+ tdNode.innerHTML = innerHTML.join("");
}
row.insertBefore(tdNode, null);
}
@@ -92,10 +87,12 @@
var ccount = childs.length;
var tcount = target.childNodes.length;
var innerHTML = [];
-
- for(var k=0; k<tcount; k++) {
+ var k;
+ for(k=0; k<tcount; k++) {
tdSrc = k<ccount ? childs[k] : null;
- innerHTML.push("<td class='ClientUI_Grid_BC'>");
+ innerHTML.push("<td class='");
+ innerHTML.push(target.childNodes[k].className);
+ innerHTML.push("'>");
innerHTML.push(tdSrc?tdSrc.innerHTML:"");
innerHTML.push("</td>");
}
Show replies by date