From 0ddab346ff681443c6ed9cf659ccd2ffcec4fda8 Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 21 Dec 2017 13:10:02 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js --- roojs-ui-debug.js | 12 ++++-------- roojs-ui.js | 8 ++++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 65ba19364e..8b977c32d9 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20929,8 +20929,6 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { insertAtCursor : function(text) { - - if(!this.activated){ return; } @@ -21481,7 +21479,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { node.className = ''; } - if (a.value.match(/body/)) { + if (a.value.match(/^body$/)) { node.className = ''; } continue; @@ -37860,20 +37858,18 @@ Roo.LoadMask.prototype = { } */ - - - this.el.unmask(this.removeMask); + (function() { this.el.unmask(this.removeMask); }).defer(50, this); }, // private onLoad : function() { - this.el.unmask(this.removeMask); + (function() { this.el.unmask(this.removeMask); }).defer(50, this); }, // private onBeforeLoad : function(){ if(!this.disabled){ - this.el.mask(this.msg, this.msgCls); + (function() { this.el.mask(this.msg, this.msgCls); }).defer(50, this); } }, diff --git a/roojs-ui.js b/roojs-ui.js index 229fc8e9fc..63d6844754 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -935,7 +935,7 @@ return;}function cleanAttr(n,v){if(v.match(/^\./)||v.match(/^\//)){return;}if(v. return;}var F=v.split(/;/);var G=[];Roo.each(F,function(p){p=p.replace(/^\s+/g,'').replace(/\s+$/g,'');if(!p.length){return true;}var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\s+$/g,'');if(D.length&&E.indexOf(l)>-1){return true; }if(D.length&&D.indexOf(l)<0){return true;}G.push(p);return true;});if(G.length){A.setAttribute(n,G.join(';'));}else{A.removeAttribute(n);}}for(var i=A.attributes.length-1;i>-1;i--){var a=A.attributes[i];if(a.name.toLowerCase().substr(0,2)=='on'){A.removeAttribute(a.name); continue;}if(Roo.HtmlEditorCore.ablack.indexOf(a.name.toLowerCase())>-1){A.removeAttribute(a.name);continue;}if(Roo.HtmlEditorCore.aclean.indexOf(a.name.toLowerCase())>-1){cleanAttr(a.name,a.value);continue;}if(a.name=='style'){cleanStyle(a.name,a.value); -continue;}if(a.name=='class'){if(a.value.match(/^Mso/)){A.className='';}if(a.value.match(/body/)){A.className='';}continue;}}this.cleanUpChildren(A);},cleanWord:function(A){if(!A){this.cleanWord(this.doc.body);return;}if(A.nodeName=="#text"){return;}if(A.nodeName=="#comment"){A.parentNode.removeChild(A); +continue;}if(a.name=='class'){if(a.value.match(/^Mso/)){A.className='';}if(a.value.match(/^body$/)){A.className='';}continue;}}this.cleanUpChildren(A);},cleanWord:function(A){if(!A){this.cleanWord(this.doc.body);return;}if(A.nodeName=="#text"){return;}if(A.nodeName=="#comment"){A.parentNode.removeChild(A); return;}if(A.tagName.toLowerCase().match(/^(style|script|applet|embed|noframes|noscript)$/)){A.parentNode.removeChild(A);return;}if(A.tagName.toLowerCase().match(/^(meta|link|\\?xml:|st1:|o:|font)/)){while(A.childNodes.length){var cn=A.childNodes[0];A.removeChild(cn); A.parentNode.insertBefore(cn,A);}A.parentNode.removeChild(A);this.iterateChildren(A,this.cleanWord);return;}if(A.className.length){var cn=A.className.split(/\W+/);var B=[];Roo.each(cn,function(E){if(E.match(/Mso[a-zA-Z]+/)){return;}B.push(E);});A.className=B.length?B.join(' '):''; if(!B.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var C=A.getAttribute("style").split(";");var D=[];Roo.each(C,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return; @@ -1658,9 +1658,9 @@ Roo.log(d);return;}A.start_dt=typeof(A.start_dt)=='string'?Date.parseDate(A.star // Roo/LoadMask.js Roo.LoadMask=function(el,A){this.el=Roo.get(el);Roo.apply(this,A);if(this.store){this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('load',this.onLoad,this);this.store.on('loadexception',this.onLoadException,this);this.removeMask=false;}else{var um=this.el.getUpdateManager(); um.showLoadIndicator=false;um.on('beforeupdate',this.onBeforeLoad,this);um.on('update',this.onLoad,this);um.on('failure',this.onLoad,this);this.removeMask=true;}};Roo.LoadMask.prototype={msg:'Loading...',msgCls:'x-mask-loading',disabled:false,disable:function(){this.disabled=true; -},enable:function(){this.disabled=false;},onLoadException:function(){Roo.log(arguments);if(typeof(arguments[3])!='undefined'){Roo.MessageBox.alert("Error loading",arguments[3]);}this.el.unmask(this.removeMask);},onLoad:function(){this.el.unmask(this.removeMask); -},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls);}},destroy:function(){if(this.store){this.store.un('beforeload',this.onBeforeLoad,this);this.store.un('load',this.onLoad,this);this.store.un('loadexception',this.onLoadException,this); -}else{var um=this.el.getUpdateManager();um.un('beforeupdate',this.onBeforeLoad,this);um.un('update',this.onLoad,this);um.un('failure',this.onLoad,this);}}}; +},enable:function(){this.disabled=false;},onLoadException:function(){Roo.log(arguments);if(typeof(arguments[3])!='undefined'){Roo.MessageBox.alert("Error loading",arguments[3]);}(function(){this.el.unmask(this.removeMask);}).defer(50,this);},onLoad:function(){(function(){this.el.unmask(this.removeMask); +}).defer(50,this);},onBeforeLoad:function(){if(!this.disabled){(function(){this.el.mask(this.msg,this.msgCls);}).defer(50,this);}},destroy:function(){if(this.store){this.store.un('beforeload',this.onBeforeLoad,this);this.store.un('load',this.onLoad,this); +this.store.un('loadexception',this.onLoadException,this);}else{var um=this.el.getUpdateManager();um.un('beforeupdate',this.onBeforeLoad,this);um.un('update',this.onLoad,this);um.un('failure',this.onLoad,this);}}}; // Roo/XTemplate.js Roo.XTemplate=function(){Roo.XTemplate.superclass.constructor.apply(this,arguments);if(this.html){this.compile();}};Roo.extend(Roo.XTemplate,Roo.Template,{tpls:false,re:/\{([\w-\.]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var s=this.html;s=['',s,''].join(''); var re=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,A=/^]*?for="(.*?)"/,B=/^]*?if="(.*?)"/,C=/^]*?exec="(.*?)"/,D=/^]*?name="(\w+)"/,m,id=0,E=[];while(true==!!(m=s.match(re))){var F=m[0].match(A),G=m[0].match(B),H=m[0].match(C),I=m[0].match(D),J=null,fn=null,K=null,L=F&&F[1]?F[1]:''; -- 2.39.2