From 5da065c75233396e2727c21f770bcdbd413e5f11 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 25 Apr 2023 13:32:52 +0800 Subject: [PATCH] more about blank removal --- Roo/bootstrap/panel/Content.js | 2 +- docs/src/Roo_bootstrap_Img.js.html | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Roo/bootstrap/panel/Content.js b/Roo/bootstrap/panel/Content.js index a44ae2e269..a7be511ae7 100644 --- a/Roo/bootstrap/panel/Content.js +++ b/Roo/bootstrap/panel/Content.js @@ -70,7 +70,7 @@ Roo.bootstrap.panel.Content = function( config){ { tag : 'iframe', style : 'border: 0px', - src : 'about:blank' + src : 'data:text/html,%3Cbody%3E%3C%2Fbody%3E' } ]; } diff --git a/docs/src/Roo_bootstrap_Img.js.html b/docs/src/Roo_bootstrap_Img.js.html index dcd960e168..d95c7a09c5 100644 --- a/docs/src/Roo_bootstrap_Img.js.html +++ b/docs/src/Roo_bootstrap_Img.js.html @@ -51,7 +51,7 @@ imgResponsive: true, border: '', - src: 'about:blank', + src: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=', href: false, target: false, xsUrl: '', diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 84470c0c4e..1eba33e06b 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -3095,7 +3095,7 @@ Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, { imgResponsive: true, border: '', - src: 'about:blank', + src: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=', href: false, target: false, xsUrl: '', diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 5ed7650e11..283d17e4b4 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -144,7 +144,7 @@ Roo.bootstrap.ButtonUploader=function(A){Roo.bootstrap.ButtonUploader.superclass },onFileSelected:function(e){e.preventDefault();if(typeof(this.selectorEl.dom.files)=='undefined'||!this.selectorEl.dom.files.length){return;}var A=Array.prototype.slice.call(this.selectorEl.dom.files);this.selectorEl.dom.value='';this.fireEvent('uploaded',this,A); },reset:function(){this.selectorEl}}); // Roo/bootstrap/Img.js -Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true,"load":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'about:blank',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',backgroundContain:false,getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg(); +Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this,A);this.addEvents({"click":true,"load":true});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',backgroundContain:false,getAutoCreate:function(){if(this.src||(!this.xsUrl&&!this.smUrl&&!this.mdUrl&&!this.lgUrl)){return this.createSingleImg(); }var A={tag:'div',cls:'roo-image-responsive-group',cn:[]};var B=this;Roo.each(['xs','sm','md','lg'],function(C){if(!B[C+'Url']){return;}var D={tag:'img',cls:(B.imgResponsive)?'img-responsive':'',html:B.html||A.html,src:B[C+'Url']};D.cls+=' roo-image-responsive-'+C; var s=['xs','sm','md','lg'];s.splice(s.indexOf(C),1);Roo.each(s,function(ss){D.cls+=' hidden-'+ss;});if(['rounded','circle','thumbnail'].indexOf(B.border)>-1){A.cls+=' img-'+B.border;}if(B.alt){A.alt=B.alt;}if(B.href){var a={tag:'a',href:B.href,cn:[D]};if(this.target){a.target=B.target; }}A.cn.push((B.href)?a:D);});return A;},createSingleImg:function(){var A={tag:'img',cls:(this.imgResponsive)?'img-responsive':'',html:null,src:Roo.BLANK_IMAGE_URL};if(this.backgroundContain){A.cls+=' background-contain';}A.html=this.html||A.html;if(this.backgroundContain){A.style="background-image: url("+this.src+')'; -- 2.39.2