Author: maksimkaszynski
Date: 2007-07-31 05:50:46 -0400 (Tue, 31 Jul 2007)
New Revision: 1944
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
fixed incompatibilities with IE7
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-31
09:34:24 UTC (rev 1943)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-31
09:50:46 UTC (rev 1944)
@@ -50,51 +50,18 @@
if (ClientUILib.isIE) {
var s = String();
- var newOuterXml = "<table><tbody>" +
src.xml.replace(Utils.xmlns, '') + "</tbody></table>";
+ var newOuterXml = "<table><tbody>" + src.xml +
"</tbody></table>";
var newNode = document.createElement("DIV");
+
newNode.innerHTML = newOuterXml;
+
var imported = newNode.firstChild.firstChild.firstChild;
-
- //alert(imported);
-
target.parentNode.replaceChild(imported, target);;
return imported;
- } /*else if (ClientUILib.isIE) {
+ } else {
var theDoc = document;
- //var createEl = theDoc.createElement;
- row = theDoc.createElement( "TR" );
- Utils.DOM.copyAttributes(row, src);
-
- var tdSrc, tdNode, subNode;
- var childs = src.childNodes;
- var ccount = childs.length;
- var tcount = target.childNodes.length;
- for(var k=0; k<tcount; k++) {
- tdSrc = k<ccount ? childs[k] : null;
- tdNode = theDoc.createElement( "TD" );
- tdNode.className = target.childNodes[k].className;
-
- if(tdSrc) {
- innerHTML = [];
- innerCount = tdSrc.childNodes.length;
- for(j=0; j<innerCount; j++) {
- subNode = tdSrc.childNodes[j];
- innerHTML.push(subNode.xml);
- }
- tdNode.innerHTML = innerHTML.join("");
- }
- row.insertBefore(tdNode, null);
- }
-
- target.parentNode.replaceChild(row, target);
- return row;
-
- } */
- else {
- var theDoc = document;
-
Utils.DOM._clearAttributes(target);
Utils.DOM.copyAttributes(target, src);
Show replies by date