IE9 - refine createContextualFragment fix
authorAlan Knowles <alan@akbkhome.com>
Mon, 18 Jul 2011 09:46:04 +0000 (09:46 +0000)
committerAlan Knowles <alan@akbkhome.com>
Wed, 7 Sep 2011 02:07:42 +0000 (10:07 +0800)
Roo/DomHelper.js
roojs-all.js
roojs-core-debug.js
roojs-core.js
roojs-debug.js

index 6b4ff27..b4826b2 100644 (file)
 
 // nasty IE9 hack - what a pile of crap that is..
 
+<<<<<<< HEAD
  if (typeof Range.prototype.createContextualFragment == "undefined") {
+=======
+ if (typeof Range != "undefined" && typeof Range.prototype.createContextualFragment == "undefined") {
+>>>>>>> cba88e023db3bc6c12affc2e25a149cdac04fd17
     Range.prototype.createContextualFragment = function (html) {
         var doc = window.document;
         var container = doc.createElement("div");
index 3624513..a9b36be 100644 (file)
@@ -79,7 +79,11 @@ G=this.getAttribute('points');if(D(F['points']['to'])){I=C.call(this,F['points']
 this.runtimeAttributes[E]=[G];if(H.length>0){this.runtimeAttributes[E]=this.runtimeAttributes[E].concat(H);}
 this.runtimeAttributes[E][this.runtimeAttributes[E].length]=I;}else {A.setRuntimeAttribute.call(this,E);}};var C=function(E,F){var G=Roo.lib.Dom.getXY(this.getEl());E=[E[0]-G[0]+F[0],E[1]-G[1]+F[1]];return E;};var D=function(E){return (typeof E!=='undefined');};})();
 (function(){Roo.lib.Scroll=function(el,C,D,E){if(el){Roo.lib.Scroll.superclass.constructor.call(this,el,C,D,E);}};Roo.extend(Roo.lib.Scroll,Roo.lib.ColorAnim);var Y=Roo.lib;var A=Y.Scroll.superclass;var B=Y.Scroll.prototype;B.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return ("Scroll "+id);};B.doMethod=function(C,D,E){var F=null;if(C=='scroll'){F=[this.method(this.currentFrame,D[0],E[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],E[1]-D[1],this.totalFrames)];}else {F=A.doMethod.call(this,C,D,E);}return F;};B.getAttribute=function(C){var D=null;var el=this.getEl();if(C=='scroll'){D=[el.scrollLeft,el.scrollTop];}else {D=A.getAttribute.call(this,C);}return D;};B.setAttribute=function(C,D,E){var el=this.getEl();if(C=='scroll'){el.scrollLeft=D[0];el.scrollTop=D[1];}else {A.setAttribute.call(this,C,D,E);}};})();
+<<<<<<< HEAD
 if(typeof Range.prototype.createContextualFragment=="undefined"){Range.prototype.createContextualFragment=function(A){var B=window.document;var C=B.createElement("div");C.innerHTML=A;var D=B.createDocumentFragment(),n;while((n=C.firstChild)){D.appendChild(n);}return D;};}
+=======
+if(typeof Range!="undefined"&&typeof Range.prototype.createContextualFragment=="undefined"){Range.prototype.createContextualFragment=function(A){var B=window.document;var C=B.createElement("div");C.innerHTML=A;var D=B.createDocumentFragment(),n;while((n=C.firstChild)){D.appendChild(n);}return D;};}
+>>>>>>> cba88e023db3bc6c12affc2e25a149cdac04fd17
 Roo.DomHelper=function(){var A=null;var B=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var C=/^table|tbody|tr|td$/i;var D={};var E=function(o){if(typeof o=='string'){return o;}var b="";if(!o.tag){o.tag="div";}
 b+="<"+o.tag;for(var M in o){if(M=="tag"||M=="children"||M=="cn"||M=="html"||typeof o[M]=="function")continue;if(M=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=' style="'+s+'"';}else if(typeof s=="object"){b+=' style="';for(var N in s){if(typeof s[N]!="function"){b+=N+":"+s[N]+";";}}
 b+='"';}}else {if(M=="cls"){b+=' class="'+o["cls"]+'"';}else if(M=="htmlFor"){b+=' for="'+o["htmlFor"]+'"';}else {b+=" "+M+'="'+o[M]+'"';}}}if(B.test(o.tag)){b+="/>";}else {b+=">";var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,O=cn.length;i<O;i++){b+=E(cn[i],b);}}else {b+=E(cn,b);}}if(o.html){b+=o.html;}
index 9924b26..49334d2 100644 (file)
@@ -4029,7 +4029,11 @@ Roo.lib.Easing = {
 
 // nasty IE9 hack - what a pile of crap that is..
 
+<<<<<<< HEAD
  if (typeof Range.prototype.createContextualFragment == "undefined") {
+=======
+ if (typeof Range != "undefined" && typeof Range.prototype.createContextualFragment == "undefined") {
+>>>>>>> cba88e023db3bc6c12affc2e25a149cdac04fd17
     Range.prototype.createContextualFragment = function (html) {
         var doc = window.document;
         var container = doc.createElement("div");
index 8395548..f5698c0 100644 (file)
@@ -79,7 +79,11 @@ G=this.getAttribute('points');if(D(F['points']['to'])){I=C.call(this,F['points']
 this.runtimeAttributes[E]=[G];if(H.length>0){this.runtimeAttributes[E]=this.runtimeAttributes[E].concat(H);}
 this.runtimeAttributes[E][this.runtimeAttributes[E].length]=I;}else {A.setRuntimeAttribute.call(this,E);}};var C=function(E,F){var G=Roo.lib.Dom.getXY(this.getEl());E=[E[0]-G[0]+F[0],E[1]-G[1]+F[1]];return E;};var D=function(E){return (typeof E!=='undefined');};})();
 (function(){Roo.lib.Scroll=function(el,C,D,E){if(el){Roo.lib.Scroll.superclass.constructor.call(this,el,C,D,E);}};Roo.extend(Roo.lib.Scroll,Roo.lib.ColorAnim);var Y=Roo.lib;var A=Y.Scroll.superclass;var B=Y.Scroll.prototype;B.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return ("Scroll "+id);};B.doMethod=function(C,D,E){var F=null;if(C=='scroll'){F=[this.method(this.currentFrame,D[0],E[0]-D[0],this.totalFrames),this.method(this.currentFrame,D[1],E[1]-D[1],this.totalFrames)];}else {F=A.doMethod.call(this,C,D,E);}return F;};B.getAttribute=function(C){var D=null;var el=this.getEl();if(C=='scroll'){D=[el.scrollLeft,el.scrollTop];}else {D=A.getAttribute.call(this,C);}return D;};B.setAttribute=function(C,D,E){var el=this.getEl();if(C=='scroll'){el.scrollLeft=D[0];el.scrollTop=D[1];}else {A.setAttribute.call(this,C,D,E);}};})();
+<<<<<<< HEAD
 if(typeof Range.prototype.createContextualFragment=="undefined"){Range.prototype.createContextualFragment=function(A){var B=window.document;var C=B.createElement("div");C.innerHTML=A;var D=B.createDocumentFragment(),n;while((n=C.firstChild)){D.appendChild(n);}return D;};}
+=======
+if(typeof Range!="undefined"&&typeof Range.prototype.createContextualFragment=="undefined"){Range.prototype.createContextualFragment=function(A){var B=window.document;var C=B.createElement("div");C.innerHTML=A;var D=B.createDocumentFragment(),n;while((n=C.firstChild)){D.appendChild(n);}return D;};}
+>>>>>>> cba88e023db3bc6c12affc2e25a149cdac04fd17
 Roo.DomHelper=function(){var A=null;var B=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var C=/^table|tbody|tr|td$/i;var D={};var E=function(o){if(typeof o=='string'){return o;}var b="";if(!o.tag){o.tag="div";}
 b+="<"+o.tag;for(var M in o){if(M=="tag"||M=="children"||M=="cn"||M=="html"||typeof o[M]=="function")continue;if(M=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=' style="'+s+'"';}else if(typeof s=="object"){b+=' style="';for(var N in s){if(typeof s[N]!="function"){b+=N+":"+s[N]+";";}}
 b+='"';}}else {if(M=="cls"){b+=' class="'+o["cls"]+'"';}else if(M=="htmlFor"){b+=' for="'+o["htmlFor"]+'"';}else {b+=" "+M+'="'+o[M]+'"';}}}if(B.test(o.tag)){b+="/>";}else {b+=">";var cn=o.children||o.cn;if(cn){if((cn instanceof Array)||(Roo.isSafari&&typeof(cn.join)=="function")){for(var i=0,O=cn.length;i<O;i++){b+=E(cn[i],b);}}else {b+=E(cn,b);}}if(o.html){b+=o.html;}
index cf7204a..94ad816 100644 (file)
@@ -4029,7 +4029,11 @@ Roo.lib.Easing = {
 
 // nasty IE9 hack - what a pile of crap that is..
 
+<<<<<<< HEAD
  if (typeof Range.prototype.createContextualFragment == "undefined") {
+=======
+ if (typeof Range != "undefined" && typeof Range.prototype.createContextualFragment == "undefined") {
+>>>>>>> cba88e023db3bc6c12affc2e25a149cdac04fd17
     Range.prototype.createContextualFragment = function (html) {
         var doc = window.document;
         var container = doc.createElement("div");