roojs-ui.js
authorAlan <alan@roojs.com>
Thu, 21 Jul 2022 09:05:23 +0000 (17:05 +0800)
committerAlan <alan@roojs.com>
Thu, 21 Jul 2022 09:05:23 +0000 (17:05 +0800)
roojs-ui-debug.js
roojs-bootstrap.js
roojs-bootstrap-debug.js
roojs-all.js
roojs-debug.js
Roo/htmleditor/FilterWord.js

Roo/htmleditor/FilterWord.js
roojs-all.js
roojs-bootstrap-debug.js
roojs-bootstrap.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 5207a79..c48dec0 100644 (file)
@@ -326,7 +326,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             lvl = nlvl;
             
             // not starting at 1..
-            if (!stack[nlvl].hasAtribute("start") && num > 1) {
+            if (!stack[nlvl].hasAttribute("start") && num > 1) {
                 stack[nlvl].setAttribuet("start", num);
             }
             
index 0712c1f..8b16cd1 100644 (file)
@@ -1938,9 +1938,10 @@ for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAtt
 var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
 ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
 for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
-var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N={};for(var i=0;i<M.length;i++){N=this.styleToObject(M[i]);if(typeof(N['mso-list'])=='undefined'){continue;
-}M[i].parentNode.removeChild(M[i]);break;}N=this.styleToObject(n);if(typeof(N['mso-list'])=='undefined'){A.removeChild(n);return;}var O=N['margin-left'];if(typeof(K[O])=='undefined'){max_margins++;K[O]=max_margins;}nlvl=K[O];if(nlvl>H){var P=B.createElement(D);
-if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(P);I[nlvl]=P;}H=nlvl;var Q=I[nlvl].appendChild(B.createElement('li'));J=Q;Q.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
+var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
+}if(D=='ol'){var N=M[i].innerText.replace(/[^0-9]+]/g,'');}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;
+K[P]=max_margins;}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAtribute("start")&&N>1){I[nlvl].setAttribuet("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
 // Roo/htmleditor/FilterStyleToTag.js
 Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
 }var B=[];for(var k in this.tags){if(A.style[this.tags[k][0]]==this.tags[k][1]){B.push(k);A.style.removeProperty(this.tags[k][0]);}}if(!B.length){return true;}var cn=Array.from(A.childNodes);var nn=A;Roo.each(B,function(t){var nc=A.ownerDocument.createElement(t);
index f5edf92..c44684b 100644 (file)
@@ -26761,7 +26761,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
            
                 
-            
+            var num = 1;
             var style = {};
             for(var i = 0; i < spans.length; i++) {
             
@@ -26769,7 +26769,9 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
                 if (typeof(style['mso-list']) == 'undefined') {
                     continue;
                 }
-                
+                if (listtype == 'ol') {
+                    var num = spans[i].innerText.replace(/[^0-9]+]/g,'');
+                }
                 spans[i].parentNode.removeChild(spans[i]); // remove the fake bullet.
                 break;
             }
@@ -26803,6 +26805,11 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
             lvl = nlvl;
             
+            // not starting at 1..
+            if (!stack[nlvl].hasAtribute("start") && num > 1) {
+                stack[nlvl].setAttribuet("start", num);
+            }
+            
             var nli = stack[nlvl].appendChild(doc.createElement('li'));
             last_li = nli;
             nli.innerHTML = n.innerHTML;
index d44adda..fd96021 100644 (file)
@@ -1157,9 +1157,10 @@ for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAtt
 var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
 ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
 for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
-var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N={};for(var i=0;i<M.length;i++){N=this.styleToObject(M[i]);if(typeof(N['mso-list'])=='undefined'){continue;
-}M[i].parentNode.removeChild(M[i]);break;}N=this.styleToObject(n);if(typeof(N['mso-list'])=='undefined'){A.removeChild(n);return;}var O=N['margin-left'];if(typeof(K[O])=='undefined'){max_margins++;K[O]=max_margins;}nlvl=K[O];if(nlvl>H){var P=B.createElement(D);
-if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(P);I[nlvl]=P;}H=nlvl;var Q=I[nlvl].appendChild(B.createElement('li'));J=Q;Q.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
+var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
+}if(D=='ol'){var N=M[i].innerText.replace(/[^0-9]+]/g,'');}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;
+K[P]=max_margins;}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAtribute("start")&&N>1){I[nlvl].setAttribuet("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
 // Roo/htmleditor/FilterStyleToTag.js
 Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
 }var B=[];for(var k in this.tags){if(A.style[this.tags[k][0]]==this.tags[k][1]){B.push(k);A.style.removeProperty(this.tags[k][0]);}}if(!B.length){return true;}var cn=Array.from(A.childNodes);var nn=A;Roo.each(B,function(t){var nc=A.ownerDocument.createElement(t);
index 6f2670f..ddbc892 100644 (file)
@@ -46375,7 +46375,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
            
                 
-            
+            var num = 1;
             var style = {};
             for(var i = 0; i < spans.length; i++) {
             
@@ -46383,7 +46383,9 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
                 if (typeof(style['mso-list']) == 'undefined') {
                     continue;
                 }
-                
+                if (listtype == 'ol') {
+                    var num = spans[i].innerText.replace(/[^0-9]+]/g,'');
+                }
                 spans[i].parentNode.removeChild(spans[i]); // remove the fake bullet.
                 break;
             }
@@ -46417,6 +46419,11 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
             lvl = nlvl;
             
+            // not starting at 1..
+            if (!stack[nlvl].hasAtribute("start") && num > 1) {
+                stack[nlvl].setAttribuet("start", num);
+            }
+            
             var nli = stack[nlvl].appendChild(doc.createElement('li'));
             last_li = nli;
             nli.innerHTML = n.innerHTML;
index 51e539f..b27fe0e 100644 (file)
@@ -21883,7 +21883,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
            
                 
-            
+            var num = 1;
             var style = {};
             for(var i = 0; i < spans.length; i++) {
             
@@ -21891,7 +21891,9 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
                 if (typeof(style['mso-list']) == 'undefined') {
                     continue;
                 }
-                
+                if (listtype == 'ol') {
+                    var num = spans[i].innerText.replace(/[^0-9]+]/g,'');
+                }
                 spans[i].parentNode.removeChild(spans[i]); // remove the fake bullet.
                 break;
             }
@@ -21925,6 +21927,11 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter,
             }
             lvl = nlvl;
             
+            // not starting at 1..
+            if (!stack[nlvl].hasAtribute("start") && num > 1) {
+                stack[nlvl].setAttribuet("start", num);
+            }
+            
             var nli = stack[nlvl].appendChild(doc.createElement('li'));
             last_li = nli;
             nli.innerHTML = n.innerHTML;
index 45972b8..093f8f0 100644 (file)
@@ -992,9 +992,10 @@ for(var i=0;i<C.length;i++){if(C.item(i).hasAttribute('style')&&C.item(i).getAtt
 var D='ul';while(ns){if(ns.nodeType!=1){ns=ns.nextSibling;continue;}if(!ns.className.match(/(MsoListParagraph|ql-indent-1)/i)){break;}var E=ns.getElementsByTagName('span');if(ns.hasAttribute('style')&&ns.getAttribute('style').match(/mso-list/)){C.push(ns);
 ns=ns.nextSibling;G=true;if(E.length&&E[0].hasAttribute('style')){var F=this.styleToObject(E[0]);if(typeof(F['font-family'])!='undefined'&&!F['font-family'].match(/Symbol/)){D='ol';}}continue;}var E=ns.getElementsByTagName('span');if(!E.length){break;}var G=false;
 for(var i=0;i<E.length;i++){if(E[i].hasAttribute('style')&&E[i].getAttribute('style').match(/mso-list/)){G=true;break;}}if(!G){break;}C.push(ns);ns=ns.nextSibling;}if(!C.length){ns.className="";return;}var ul=A.ownerDocument.createElement(D);A.insertBefore(ul,p);
-var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N={};for(var i=0;i<M.length;i++){N=this.styleToObject(M[i]);if(typeof(N['mso-list'])=='undefined'){continue;
-}M[i].parentNode.removeChild(M[i]);break;}N=this.styleToObject(n);if(typeof(N['mso-list'])=='undefined'){A.removeChild(n);return;}var O=N['margin-left'];if(typeof(K[O])=='undefined'){max_margins++;K[O]=max_margins;}nlvl=K[O];if(nlvl>H){var P=B.createElement(D);
-if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(P);I[nlvl]=P;}H=nlvl;var Q=I[nlvl].appendChild(B.createElement('li'));J=Q;Q.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
+var H=0;var I=[ul];var J=false;var K={};max_margins=-1;C.forEach(function(n,L){var M=n.getElementsByTagName('span');if(!M.length){A.removeChild(n);return;}var N=1;var O={};for(var i=0;i<M.length;i++){O=this.styleToObject(M[i]);if(typeof(O['mso-list'])=='undefined'){continue;
+}if(D=='ol'){var N=M[i].innerText.replace(/[^0-9]+]/g,'');}M[i].parentNode.removeChild(M[i]);break;}O=this.styleToObject(n);if(typeof(O['mso-list'])=='undefined'){A.removeChild(n);return;}var P=O['margin-left'];if(typeof(K[P])=='undefined'){max_margins++;
+K[P]=max_margins;}nlvl=K[P];if(nlvl>H){var Q=B.createElement(D);if(!J){J=B.createElement('li');I[H].appendChild(J);}J.appendChild(Q);I[nlvl]=Q;}H=nlvl;if(!I[nlvl].hasAtribute("start")&&N>1){I[nlvl].setAttribuet("start",N);}var R=I[nlvl].appendChild(B.createElement('li'));
+J=R;R.innerHTML=n.innerHTML;A.removeChild(n);},this);}});
 // Roo/htmleditor/FilterStyleToTag.js
 Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true;
 }var B=[];for(var k in this.tags){if(A.style[this.tags[k][0]]==this.tags[k][1]){B.push(k);A.style.removeProperty(this.tags[k][0]);}}if(!B.length){return true;}var cn=Array.from(A.childNodes);var nn=A;Roo.each(B,function(t){var nc=A.ownerDocument.createElement(t);