sync;
authorleon <leon@roojs.com>
Tue, 27 Feb 2024 03:32:37 +0000 (11:32 +0800)
committerleon <leon@roojs.com>
Tue, 27 Feb 2024 03:32:37 +0000 (11:32 +0800)
buildSDK/dependancy_bootstrap.txt
buildSDK/dependancy_ui.txt
roojs-all.js
roojs-bootstrap-debug.js
roojs-bootstrap.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index be94028..34d1a84 100644 (file)
@@ -145,6 +145,7 @@ Roo.htmleditor.Filter
 Roo.htmleditor.FilterAttributes
 Roo.htmleditor.FilterBlack
 Roo.htmleditor.FilterComment
+Roo.htmleditor.FilterEmpty
 Roo.htmleditor.FilterKeepChildren
 Roo.htmleditor.FilterParagraph
 Roo.htmleditor.FilterHashLink
index dcf507c..acbfe60 100644 (file)
@@ -114,6 +114,7 @@ Roo.htmleditor.Filter
 Roo.htmleditor.FilterAttributes
 Roo.htmleditor.FilterBlack
 Roo.htmleditor.FilterComment
+Roo.htmleditor.FilterEmpty
 Roo.htmleditor.FilterKeepChildren
 Roo.htmleditor.FilterParagraph
 Roo.htmleditor.FilterHashLink
index aa0a658..225a793 100644 (file)
@@ -2026,6 +2026,9 @@ var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\
 Roo.htmleditor.FilterBlack=function(A){Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterBlack,Roo.htmleditor.Filter,{tag:true,replaceTag:function(n){n.parentNode.removeChild(n);}});
 // Roo/htmleditor/FilterComment.js
 Roo.htmleditor.FilterComment=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterComment,Roo.htmleditor.Filter,{replaceComment:function(n){n.parentNode.removeChild(n);}});
+// Roo/htmleditor/FilterEmpty.js
+Roo.htmleditor.FilterEmpty=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterEmpty,Roo.htmleditor.FilterBlack,{tag:true,replaceTag:function(A){if(A.hasChildNodes()){this.walk(A);}if(['B','I','U','S'].indexOf(A.tagName)<0||A.attributes&&A.attributes.length>0||A.hasChildNodes()){return false;
+}Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this,A);return false;}});
 // Roo/htmleditor/FilterKeepChildren.js
 Roo.htmleditor.FilterKeepChildren=function(A){Roo.apply(this,A);if(this.tag===false){return;}if((typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)){this.cleanNamespace=true;}this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterKeepChildren,Roo.htmleditor.FilterBlack,{cleanNamespace:false,replaceTag:function(A){var ar=Array.from(A.childNodes);
 for(var i=0;i<ar.length;i++){var e=ar[i];if(e.nodeType==1){if((typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1)||(typeof(this.tag)=='string'&&this.tag==e.tagName)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":")){this.replaceTag(ar[i]);
index 09cc060..12f6498 100644 (file)
@@ -27315,6 +27315,49 @@ Roo.extend(Roo.htmleditor.FilterComment, Roo.htmleditor.Filter,
     {
         n.parentNode.removeChild(n);
     }
+});/**
+ * @class Roo.htmleditor.FilterEmpty
+ * filter empty elements
+ * @constructor
+ * Run a new Empty Filter
+ * @param {Object} config Configuration options
+ */
+
+Roo.htmleditor.FilterEmpty = function(cfg)
+{
+    // no need to apply config.
+    this.walk(cfg.node);
+}
+
+Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
+{
+     
+    tag : true,
+     
+    replaceTag : function(node)
+    {
+        // start from leaf node
+        if(node.hasChildNodes()) {
+            this.walk(node);
+        }
+
+        // only filter empty leaf element with certain tags
+        if(
+            ['B', 'I', 'U', 'S'].indexOf(node.tagName) < 0
+            ||
+            node.attributes && node.attributes.length > 0
+            ||
+            node.hasChildNodes()
+        ) {
+            return false; // don't walk
+        }
+
+        Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);
+        return false; // don't walk
+     
+    }
+    
 });/**
  * @class Roo.htmleditor.FilterKeepChildren
  * remove tags but keep children
index 872921d..be1b4e5 100644 (file)
@@ -1197,6 +1197,9 @@ var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\
 Roo.htmleditor.FilterBlack=function(A){Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterBlack,Roo.htmleditor.Filter,{tag:true,replaceTag:function(n){n.parentNode.removeChild(n);}});
 // Roo/htmleditor/FilterComment.js
 Roo.htmleditor.FilterComment=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterComment,Roo.htmleditor.Filter,{replaceComment:function(n){n.parentNode.removeChild(n);}});
+// Roo/htmleditor/FilterEmpty.js
+Roo.htmleditor.FilterEmpty=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterEmpty,Roo.htmleditor.FilterBlack,{tag:true,replaceTag:function(A){if(A.hasChildNodes()){this.walk(A);}if(['B','I','U','S'].indexOf(A.tagName)<0||A.attributes&&A.attributes.length>0||A.hasChildNodes()){return false;
+}Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this,A);return false;}});
 // Roo/htmleditor/FilterKeepChildren.js
 Roo.htmleditor.FilterKeepChildren=function(A){Roo.apply(this,A);if(this.tag===false){return;}if((typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)){this.cleanNamespace=true;}this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterKeepChildren,Roo.htmleditor.FilterBlack,{cleanNamespace:false,replaceTag:function(A){var ar=Array.from(A.childNodes);
 for(var i=0;i<ar.length;i++){var e=ar[i];if(e.nodeType==1){if((typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1)||(typeof(this.tag)=='string'&&this.tag==e.tagName)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":")){this.replaceTag(ar[i]);
index 98ed3e8..0efea11 100644 (file)
@@ -47920,6 +47920,49 @@ Roo.extend(Roo.htmleditor.FilterComment, Roo.htmleditor.Filter,
     {
         n.parentNode.removeChild(n);
     }
+});/**
+ * @class Roo.htmleditor.FilterEmpty
+ * filter empty elements
+ * @constructor
+ * Run a new Empty Filter
+ * @param {Object} config Configuration options
+ */
+
+Roo.htmleditor.FilterEmpty = function(cfg)
+{
+    // no need to apply config.
+    this.walk(cfg.node);
+}
+
+Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
+{
+     
+    tag : true,
+     
+    replaceTag : function(node)
+    {
+        // start from leaf node
+        if(node.hasChildNodes()) {
+            this.walk(node);
+        }
+
+        // only filter empty leaf element with certain tags
+        if(
+            ['B', 'I', 'U', 'S'].indexOf(node.tagName) < 0
+            ||
+            node.attributes && node.attributes.length > 0
+            ||
+            node.hasChildNodes()
+        ) {
+            return false; // don't walk
+        }
+
+        Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);
+        return false; // don't walk
+     
+    }
+    
 });/**
  * @class Roo.htmleditor.FilterKeepChildren
  * remove tags but keep children
index 938c449..69a3b2b 100644 (file)
@@ -23418,6 +23418,49 @@ Roo.extend(Roo.htmleditor.FilterComment, Roo.htmleditor.Filter,
     {
         n.parentNode.removeChild(n);
     }
+});/**
+ * @class Roo.htmleditor.FilterEmpty
+ * filter empty elements
+ * @constructor
+ * Run a new Empty Filter
+ * @param {Object} config Configuration options
+ */
+
+Roo.htmleditor.FilterEmpty = function(cfg)
+{
+    // no need to apply config.
+    this.walk(cfg.node);
+}
+
+Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
+{
+     
+    tag : true,
+     
+    replaceTag : function(node)
+    {
+        // start from leaf node
+        if(node.hasChildNodes()) {
+            this.walk(node);
+        }
+
+        // only filter empty leaf element with certain tags
+        if(
+            ['B', 'I', 'U', 'S'].indexOf(node.tagName) < 0
+            ||
+            node.attributes && node.attributes.length > 0
+            ||
+            node.hasChildNodes()
+        ) {
+            return false; // don't walk
+        }
+
+        Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);
+        return false; // don't walk
+     
+    }
+    
 });/**
  * @class Roo.htmleditor.FilterKeepChildren
  * remove tags but keep children
index ef1b1fc..a5b7dfd 100644 (file)
@@ -1079,6 +1079,9 @@ var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\
 Roo.htmleditor.FilterBlack=function(A){Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterBlack,Roo.htmleditor.Filter,{tag:true,replaceTag:function(n){n.parentNode.removeChild(n);}});
 // Roo/htmleditor/FilterComment.js
 Roo.htmleditor.FilterComment=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterComment,Roo.htmleditor.Filter,{replaceComment:function(n){n.parentNode.removeChild(n);}});
+// Roo/htmleditor/FilterEmpty.js
+Roo.htmleditor.FilterEmpty=function(A){this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterEmpty,Roo.htmleditor.FilterBlack,{tag:true,replaceTag:function(A){if(A.hasChildNodes()){this.walk(A);}if(['B','I','U','S'].indexOf(A.tagName)<0||A.attributes&&A.attributes.length>0||A.hasChildNodes()){return false;
+}Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this,A);return false;}});
 // Roo/htmleditor/FilterKeepChildren.js
 Roo.htmleditor.FilterKeepChildren=function(A){Roo.apply(this,A);if(this.tag===false){return;}if((typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)){this.cleanNamespace=true;}this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterKeepChildren,Roo.htmleditor.FilterBlack,{cleanNamespace:false,replaceTag:function(A){var ar=Array.from(A.childNodes);
 for(var i=0;i<ar.length;i++){var e=ar[i];if(e.nodeType==1){if((typeof(this.tag)=='object'&&this.tag.indexOf(e.tagName)>-1)||(typeof(this.tag)=='string'&&this.tag==e.tagName)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='object'&&this.tag.indexOf(":")>-1)||(e.tagName.indexOf(":")>-1&&typeof(this.tag)=='string'&&this.tag==":")){this.replaceTag(ar[i]);