From ffcf56266241c718102ebfe2fbb56d3519e77db6 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 3 Jan 2022 15:03:49 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-bootstrap.js roojs-bootstrap-debug.js roojs-all.js roojs-debug.js Roo/HtmlEditorCore.js --- Roo/HtmlEditorCore.js | 2 +- roojs-all.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- roojs-debug.js | 2 +- roojs-ui-debug.js | 2 +- roojs-ui.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Roo/HtmlEditorCore.js b/Roo/HtmlEditorCore.js index beba7a294e..86cedca79a 100644 --- a/Roo/HtmlEditorCore.js +++ b/Roo/HtmlEditorCore.js @@ -1434,7 +1434,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { updateLanguage : function() { - if (!this.iframe) { + if (!this.iframe || !this.iframe.content) { return; } Roo.get(this.iframe.content.body).attr("lang", this.language); diff --git a/roojs-all.js b/roojs-all.js index d61badc863..3c3f44a400 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2079,7 +2079,7 @@ this.tag_remove=typeof(this.owner.tag_remove)!='undefined'&&this.owner.tag_remov }if(this.black.indexOf(A)>-1){return;}this.black.push(A);},this);w=typeof(this.owner.cwhite)!='undefined'&&this.owner.cwhite?this.owner.cwhite:[];b=typeof(this.owner.cblack)!='undefined'&&this.owner.cblack?this.owner.cblack:[];this.cwhite=[];this.cblack=[]; Roo.each(Roo.HtmlEditorCore.cwhite,function(A){if(b.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(w,function(A){if(b.indexOf(A)>-1){return;}if(this.cwhite.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(Roo.HtmlEditorCore.cblack,function(A){if(w.indexOf(A)>-1){return; }this.cblack.push(A);},this);Roo.each(b,function(A){if(w.indexOf(A)>-1){return;}if(this.cblack.indexOf(A)>-1){return;}this.cblack.push(A);},this);},setStylesheets:function(A){if(typeof(A)=='string'){Roo.get(this.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:A} -);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); +);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe||!this.iframe.content){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); },removeStylesheets:function(){var A=this;Roo.each(Roo.get(A.iframe.contentDocument.head).select('link[rel=stylesheet]',true).elements,function(s){s.remove();});},setStyle:function(A){Roo.get(this.iframe.contentDocument.head).createChild({tag:'style',type:'text/css',html:A} );return;}});Roo.HtmlEditorCore.white=['AREA','BR','IMG','INPUT','HR','WBR','ADDRESS','BLOCKQUOTE','CENTER','DD','DIR','DIV','DL','DT','H1','H2','H3','H4','H5','H6','HR','ISINDEX','LISTING','MARQUEE','MENU','MULTICOL','OL','P','PLAINTEXT','PRE','TABLE','UL','XMP','CAPTION','COL','COLGROUP','TBODY','TD','TFOOT','TH','THEAD','TR','DIR','MENU','OL','UL','DL','EMBED','OBJECT']; Roo.HtmlEditorCore.black=['APPLET','BASE','BASEFONT','BGSOUND','BLINK','BODY','FRAME','FRAMESET','HEAD','HTML','ILAYER','IFRAME','LAYER','LINK','META','OBJECT','SCRIPT','STYLE','TITLE','XML','COLGROUP','COL'];Roo.HtmlEditorCore.clean=['SCRIPT','STYLE','TITLE','XML']; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 554777dc5c..44b61e7b8f 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -29910,7 +29910,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { updateLanguage : function() { - if (!this.iframe) { + if (!this.iframe || !this.iframe.content) { return; } Roo.get(this.iframe.content.body).attr("lang", this.language); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 27585a6f16..2ce9842ae9 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1294,7 +1294,7 @@ this.tag_remove=typeof(this.owner.tag_remove)!='undefined'&&this.owner.tag_remov }if(this.black.indexOf(A)>-1){return;}this.black.push(A);},this);w=typeof(this.owner.cwhite)!='undefined'&&this.owner.cwhite?this.owner.cwhite:[];b=typeof(this.owner.cblack)!='undefined'&&this.owner.cblack?this.owner.cblack:[];this.cwhite=[];this.cblack=[]; Roo.each(Roo.HtmlEditorCore.cwhite,function(A){if(b.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(w,function(A){if(b.indexOf(A)>-1){return;}if(this.cwhite.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(Roo.HtmlEditorCore.cblack,function(A){if(w.indexOf(A)>-1){return; }this.cblack.push(A);},this);Roo.each(b,function(A){if(w.indexOf(A)>-1){return;}if(this.cblack.indexOf(A)>-1){return;}this.cblack.push(A);},this);},setStylesheets:function(A){if(typeof(A)=='string'){Roo.get(this.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:A} -);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); +);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe||!this.iframe.content){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); },removeStylesheets:function(){var A=this;Roo.each(Roo.get(A.iframe.contentDocument.head).select('link[rel=stylesheet]',true).elements,function(s){s.remove();});},setStyle:function(A){Roo.get(this.iframe.contentDocument.head).createChild({tag:'style',type:'text/css',html:A} );return;}});Roo.HtmlEditorCore.white=['AREA','BR','IMG','INPUT','HR','WBR','ADDRESS','BLOCKQUOTE','CENTER','DD','DIR','DIV','DL','DT','H1','H2','H3','H4','H5','H6','HR','ISINDEX','LISTING','MARQUEE','MENU','MULTICOL','OL','P','PLAINTEXT','PRE','TABLE','UL','XMP','CAPTION','COL','COLGROUP','TBODY','TD','TFOOT','TH','THEAD','TR','DIR','MENU','OL','UL','DL','EMBED','OBJECT']; Roo.HtmlEditorCore.black=['APPLET','BASE','BASEFONT','BGSOUND','BLINK','BODY','FRAME','FRAMESET','HEAD','HTML','ILAYER','IFRAME','LAYER','LINK','META','OBJECT','SCRIPT','STYLE','TITLE','XML','COLGROUP','COL'];Roo.HtmlEditorCore.clean=['SCRIPT','STYLE','TITLE','XML']; diff --git a/roojs-debug.js b/roojs-debug.js index 06f6051545..314e736129 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -49618,7 +49618,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { updateLanguage : function() { - if (!this.iframe) { + if (!this.iframe || !this.iframe.content) { return; } Roo.get(this.iframe.content.body).attr("lang", this.language); diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 73a1a0a116..25f07b6f7f 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -25149,7 +25149,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { updateLanguage : function() { - if (!this.iframe) { + if (!this.iframe || !this.iframe.content) { return; } Roo.get(this.iframe.content.body).attr("lang", this.language); diff --git a/roojs-ui.js b/roojs-ui.js index 47a175f518..3a6389558e 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1134,7 +1134,7 @@ this.tag_remove=typeof(this.owner.tag_remove)!='undefined'&&this.owner.tag_remov }if(this.black.indexOf(A)>-1){return;}this.black.push(A);},this);w=typeof(this.owner.cwhite)!='undefined'&&this.owner.cwhite?this.owner.cwhite:[];b=typeof(this.owner.cblack)!='undefined'&&this.owner.cblack?this.owner.cblack:[];this.cwhite=[];this.cblack=[]; Roo.each(Roo.HtmlEditorCore.cwhite,function(A){if(b.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(w,function(A){if(b.indexOf(A)>-1){return;}if(this.cwhite.indexOf(A)>-1){return;}this.cwhite.push(A);},this);Roo.each(Roo.HtmlEditorCore.cblack,function(A){if(w.indexOf(A)>-1){return; }this.cblack.push(A);},this);Roo.each(b,function(A){if(w.indexOf(A)>-1){return;}if(this.cblack.indexOf(A)>-1){return;}this.cblack.push(A);},this);},setStylesheets:function(A){if(typeof(A)=='string'){Roo.get(this.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:A} -);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); +);return;}var B=this;Roo.each(A,function(s){if(!s.length){return;}Roo.get(B.iframe.contentDocument.head).createChild({tag:'link',rel:'stylesheet',type:'text/css',href:s});});},updateLanguage:function(){if(!this.iframe||!this.iframe.content){return;}Roo.get(this.iframe.content.body).attr("lang",this.language); },removeStylesheets:function(){var A=this;Roo.each(Roo.get(A.iframe.contentDocument.head).select('link[rel=stylesheet]',true).elements,function(s){s.remove();});},setStyle:function(A){Roo.get(this.iframe.contentDocument.head).createChild({tag:'style',type:'text/css',html:A} );return;}});Roo.HtmlEditorCore.white=['AREA','BR','IMG','INPUT','HR','WBR','ADDRESS','BLOCKQUOTE','CENTER','DD','DIR','DIV','DL','DT','H1','H2','H3','H4','H5','H6','HR','ISINDEX','LISTING','MARQUEE','MENU','MULTICOL','OL','P','PLAINTEXT','PRE','TABLE','UL','XMP','CAPTION','COL','COLGROUP','TBODY','TD','TFOOT','TH','THEAD','TR','DIR','MENU','OL','UL','DL','EMBED','OBJECT']; Roo.HtmlEditorCore.black=['APPLET','BASE','BASEFONT','BGSOUND','BLINK','BODY','FRAME','FRAMESET','HEAD','HTML','ILAYER','IFRAME','LAYER','LINK','META','OBJECT','SCRIPT','STYLE','TITLE','XML','COLGROUP','COL'];Roo.HtmlEditorCore.clean=['SCRIPT','STYLE','TITLE','XML']; -- 2.39.2