roojs-core.js
authorleon <leon@roojs.com>
Mon, 20 Nov 2023 08:08:24 +0000 (16:08 +0800)
committerleon <leon@roojs.com>
Mon, 20 Nov 2023 08:08:24 +0000 (16:08 +0800)
roojs-core-debug.js
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js

roojs-all.js
roojs-bootstrap-debug.js
roojs-bootstrap.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 6c6bdac..e72fd67 100644 (file)
@@ -1897,7 +1897,7 @@ Roo.htmleditor={};
 Roo.htmleditor.Filter=function(A){Roo.apply(this.cfg);};Roo.htmleditor.Filter.prototype={node:false,tag:false,replaceComment:false,replaceTag:false,walk:function(A){Roo.each(Array.from(A.childNodes),function(e){switch(true){case e.nodeType==8&&this.replaceComment!==false:this.replaceComment(e);
 return;case e.nodeType!=1:return;case this.tag===true:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":":case typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1:case typeof(this.tag)=='string'&&this.tag==e.tagName:if(this.replaceTag&&false===this.replaceTag(e)){return;
 }if(e.hasChildNodes()){this.walk(e);}return;default:if(e.hasChildNodes()){this.walk(e);}}},this);},removeNodeKeepChildren:function(A){ar=Array.from(A.childNodes);for(var i=0;i<ar.length;i++){A.removeChild(ar[i]);A.parentNode.insertBefore(ar[i],A);}A.parentNode.removeChild(A);
-},walkTag:function(A){if(this.tag===false){return;}Roo.log('WALK TAG');var B=A.getElementsByTagName(this.tag);Roo.log(B.length);for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}Roo.log(B.length);}}};
+},walkTag:function(A){if(this.tag===false){return;}var B=A.getElementsByTagName(this.tag);var l=B.length;for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}if(l!=B.length){l=B.length;i--;}}}};
 // Roo/htmleditor/FilterAttributes.js
 Roo.htmleditor.FilterAttributes=function(A){Roo.apply(this,A);this.attrib_black=this.attrib_black||[];this.attrib_white=this.attrib_white||[];this.attrib_clean=this.attrib_clean||[];this.style_white=this.style_white||[];this.style_black=this.style_black||[];
 this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterAttributes,Roo.htmleditor.Filter,{tag:true,attrib_black:false,attrib_clean:false,attrib_white:false,style_white:false,style_black:false,replaceTag:function(A){if(!A.attributes||!A.attributes.length){return true;
index ac5a376..f2b62e9 100644 (file)
@@ -27103,15 +27103,19 @@ Roo.htmleditor.Filter.prototype = {
             return;
         }
 
-        Roo.log('WALK TAG');
         var els = dom.getElementsByTagName(this.tag);
-        Roo.log(els.length);
+        var l = els.length;
 
         for(var i = 0 ; i < els.length; i++) {
             if(this.replaceTag) {
                 this.replaceTag(els[i]);
             }
-            Roo.log(els.length);
+
+            // a node is removed
+            if(l != els.length) {
+                l = els.length;
+                i --;
+            }
         }
     }
 }; 
index 5a3d705..708d8ab 100644 (file)
@@ -1182,7 +1182,7 @@ this.push({type:'endparagraph',pos:this.cpos,row:this.row,col:this.col});}};
 Roo.htmleditor.Filter=function(A){Roo.apply(this.cfg);};Roo.htmleditor.Filter.prototype={node:false,tag:false,replaceComment:false,replaceTag:false,walk:function(A){Roo.each(Array.from(A.childNodes),function(e){switch(true){case e.nodeType==8&&this.replaceComment!==false:this.replaceComment(e);
 return;case e.nodeType!=1:return;case this.tag===true:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":":case typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1:case typeof(this.tag)=='string'&&this.tag==e.tagName:if(this.replaceTag&&false===this.replaceTag(e)){return;
 }if(e.hasChildNodes()){this.walk(e);}return;default:if(e.hasChildNodes()){this.walk(e);}}},this);},removeNodeKeepChildren:function(A){ar=Array.from(A.childNodes);for(var i=0;i<ar.length;i++){A.removeChild(ar[i]);A.parentNode.insertBefore(ar[i],A);}A.parentNode.removeChild(A);
-},walkTag:function(A){if(this.tag===false){return;}Roo.log('WALK TAG');var B=A.getElementsByTagName(this.tag);Roo.log(B.length);for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}Roo.log(B.length);}}};
+},walkTag:function(A){if(this.tag===false){return;}var B=A.getElementsByTagName(this.tag);var l=B.length;for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}if(l!=B.length){l=B.length;i--;}}}};
 // Roo/htmleditor/FilterAttributes.js
 Roo.htmleditor.FilterAttributes=function(A){Roo.apply(this,A);this.attrib_black=this.attrib_black||[];this.attrib_white=this.attrib_white||[];this.attrib_clean=this.attrib_clean||[];this.style_white=this.style_white||[];this.style_black=this.style_black||[];
 this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterAttributes,Roo.htmleditor.Filter,{tag:true,attrib_black:false,attrib_clean:false,attrib_white:false,style_white:false,style_black:false,replaceTag:function(A){if(!A.attributes||!A.attributes.length){return true;
index e7feaf2..aaa22c2 100644 (file)
@@ -45757,15 +45757,19 @@ Roo.htmleditor.Filter.prototype = {
             return;
         }
 
-        Roo.log('WALK TAG');
         var els = dom.getElementsByTagName(this.tag);
-        Roo.log(els.length);
+        var l = els.length;
 
         for(var i = 0 ; i < els.length; i++) {
             if(this.replaceTag) {
                 this.replaceTag(els[i]);
             }
-            Roo.log(els.length);
+
+            // a node is removed
+            if(l != els.length) {
+                l = els.length;
+                i --;
+            }
         }
     }
 }; 
index 64e687e..18f0b3d 100644 (file)
@@ -21255,15 +21255,19 @@ Roo.htmleditor.Filter.prototype = {
             return;
         }
 
-        Roo.log('WALK TAG');
         var els = dom.getElementsByTagName(this.tag);
-        Roo.log(els.length);
+        var l = els.length;
 
         for(var i = 0 ; i < els.length; i++) {
             if(this.replaceTag) {
                 this.replaceTag(els[i]);
             }
-            Roo.log(els.length);
+
+            // a node is removed
+            if(l != els.length) {
+                l = els.length;
+                i --;
+            }
         }
     }
 }; 
index 4c305c5..536fb1b 100644 (file)
@@ -950,7 +950,7 @@ Roo.htmleditor={};
 Roo.htmleditor.Filter=function(A){Roo.apply(this.cfg);};Roo.htmleditor.Filter.prototype={node:false,tag:false,replaceComment:false,replaceTag:false,walk:function(A){Roo.each(Array.from(A.childNodes),function(e){switch(true){case e.nodeType==8&&this.replaceComment!==false:this.replaceComment(e);
 return;case e.nodeType!=1:return;case this.tag===true:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1:case e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":":case typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1:case typeof(this.tag)=='string'&&this.tag==e.tagName:if(this.replaceTag&&false===this.replaceTag(e)){return;
 }if(e.hasChildNodes()){this.walk(e);}return;default:if(e.hasChildNodes()){this.walk(e);}}},this);},removeNodeKeepChildren:function(A){ar=Array.from(A.childNodes);for(var i=0;i<ar.length;i++){A.removeChild(ar[i]);A.parentNode.insertBefore(ar[i],A);}A.parentNode.removeChild(A);
-},walkTag:function(A){if(this.tag===false){return;}Roo.log('WALK TAG');var B=A.getElementsByTagName(this.tag);Roo.log(B.length);for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}Roo.log(B.length);}}};
+},walkTag:function(A){if(this.tag===false){return;}var B=A.getElementsByTagName(this.tag);var l=B.length;for(var i=0;i<B.length;i++){if(this.replaceTag){this.replaceTag(B[i]);}if(l!=B.length){l=B.length;i--;}}}};
 // Roo/htmleditor/FilterAttributes.js
 Roo.htmleditor.FilterAttributes=function(A){Roo.apply(this,A);this.attrib_black=this.attrib_black||[];this.attrib_white=this.attrib_white||[];this.attrib_clean=this.attrib_clean||[];this.style_white=this.style_white||[];this.style_black=this.style_black||[];
 this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterAttributes,Roo.htmleditor.Filter,{tag:true,attrib_black:false,attrib_clean:false,attrib_white:false,style_white:false,style_black:false,replaceTag:function(A){if(!A.attributes||!A.attributes.length){return true;