From 63f5dddb518eeda0d7cbb1619c06c63e5cc107e7 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 21 Jul 2022 17:38:33 +0800 Subject: [PATCH] fix broken merge --- docs/src/Roo_htmleditor_FilterWord.js.html | 36 +++++++++++----------- roojs-bootstrap-debug.js | 36 +++++++++++----------- roojs-bootstrap.js | 10 +++--- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/docs/src/Roo_htmleditor_FilterWord.js.html b/docs/src/Roo_htmleditor_FilterWord.js.html index dfc5e5dfa4..70bc7c9d8b 100644 --- a/docs/src/Roo_htmleditor_FilterWord.js.html +++ b/docs/src/Roo_htmleditor_FilterWord.js.html @@ -170,44 +170,44 @@ // this is a bit odd - but it appears some indents use ql-indent-1 //Roo.log(doc.innerHTML); - var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst'); + var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle'); + listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast'); + listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('ql-indent-1'); + listpara = Array.from(doc.getElementsByClassName('ql-indent-1')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } // this is a bit hacky - we had one word document where h2 had a miso-list attribute. - var htwo = doc.getElementsByTagName('h2'); + var htwo = Array.from(doc.getElementsByTagName('h2')); for( var i = 0; i < htwo.length; i ++) { - if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) { - htwo.item(i).className = "MsoListParagraph"; + if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) { + htwo[i].className = "MsoListParagraph"; } } - listpara = doc.getElementsByClassName('MsoNormal'); - while(listpara.length) { - if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) { - listpara.item(0).className = "MsoListParagraph"; + listpara = Array.from(doc.getElementsByClassName('MsoNormal')); + for( var i = 0; i < listpara.length; i ++) { + if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) { + listpara[i].className = "MsoListParagraph"; } else { - listpara.item(0).className = "MsoNormalx"; + listpara[i].className = "MsoNormalx"; } } listpara = doc.getElementsByClassName('MsoListParagraph'); + // Roo.log(doc.innerHTML); - //Roo.log(doc.innerHTML); while(listpara.length) { @@ -341,7 +341,7 @@ lvl = nlvl; // not starting at 1.. - if (!stack[nlvl].hasAttribute("start") && num > 1) { + if (!stack[nlvl].hasAttribute("start") && listtype == "ol") { stack[nlvl].setAttribute("start", num); } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index f480357f1f..0c6725fc1e 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -26650,44 +26650,44 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, // this is a bit odd - but it appears some indents use ql-indent-1 //Roo.log(doc.innerHTML); - var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst'); + var listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpFirst')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('MsoListParagraphCxSpMiddle'); + listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpMiddle')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('MsoListParagraphCxSpLast'); + listpara = Array.from(doc.getElementsByClassName('MsoListParagraphCxSpLast')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } - listpara = doc.getElementsByClassName('ql-indent-1'); + listpara = Array.from(doc.getElementsByClassName('ql-indent-1')); for( var i = 0; i < listpara.length; i ++) { - listpara.item(i).className = "MsoListParagraph"; + listpara[i].className = "MsoListParagraph"; } // this is a bit hacky - we had one word document where h2 had a miso-list attribute. - var htwo = doc.getElementsByTagName('h2'); + var htwo = Array.from(doc.getElementsByTagName('h2')); for( var i = 0; i < htwo.length; i ++) { - if (htwo.item(i).hasAttribute('style') && htwo.item(i).getAttribute('style').match(/mso-list:/)) { - htwo.item(i).className = "MsoListParagraph"; + if (htwo[i].hasAttribute('style') && htwo[i].getAttribute('style').match(/mso-list:/)) { + htwo[i].className = "MsoListParagraph"; } } - listpara = doc.getElementsByClassName('MsoNormal'); - while(listpara.length) { - if (listpara.item(0).hasAttribute('style') && listpara.item(0).getAttribute('style').match(/mso-list:/)) { - listpara.item(0).className = "MsoListParagraph"; + listpara = Array.from(doc.getElementsByClassName('MsoNormal')); + for( var i = 0; i < listpara.length; i ++) { + if (listpara[i].hasAttribute('style') && listpara[i].getAttribute('style').match(/mso-list:/)) { + listpara[i].className = "MsoListParagraph"; } else { - listpara.item(0).className = "MsoNormalx"; + listpara[i].className = "MsoNormalx"; } } listpara = doc.getElementsByClassName('MsoListParagraph'); + // Roo.log(doc.innerHTML); - //Roo.log(doc.innerHTML); while(listpara.length) { @@ -26821,7 +26821,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, lvl = nlvl; // not starting at 1.. - if (!stack[nlvl].hasAttribute("start") && num > 1) { + if (!stack[nlvl].hasAttribute("start") && listtype == "ol") { stack[nlvl].setAttribute("start", num); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index b6f4ed257c..c0a6b98db3 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1151,16 +1151,16 @@ A.removeChild(cn);A.parentNode.insertBefore(cn,A);if(cn.nodeType==1){this.replac }C.push(F);});A.className=C.length?C.join(' '):'';if(!C.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var D=A.getAttribute("style").split(";");var E=[];Roo.each(D,function(s){if(!s.match(/:/)){return; }var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return;}E.push(s);});A.setAttribute("style",E.length?E.join(';'):'');if(!E.length){A.removeAttribute('style');}}return true;},styleToObject:function(A){var B=(A.getAttribute("style")||'').split(";"); var C={};Roo.each(B,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");C[kv[0].trim()]=kv[1];});return C;},replaceAname:function(A){var aa=Array.from(A.getElementsByTagName('a'));for(var i=0;iH){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].hasAttribute("start")&&N>1){I[nlvl].setAttribute("start",N);}var R=I[nlvl].appendChild(B.createElement('li')); +}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].hasAttribute("start")&&D=="ol"){I[nlvl].setAttribute("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; -- 2.39.2