From 9ed7672039bb7fcd7422a540f65091b3d69a99b7 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 3 Jun 2021 18:18:23 +0800 Subject: [PATCH] sync --- docs/src/Roo_bootstrap_ButtonUploader.js.html | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/Roo_bootstrap_ButtonUploader.js.html b/docs/src/Roo_bootstrap_ButtonUploader.js.html index bd5e0b6ea5..1005febc64 100644 --- a/docs/src/Roo_bootstrap_ButtonUploader.js.html +++ b/docs/src/Roo_bootstrap_ButtonUploader.js.html @@ -128,7 +128,7 @@ return; } var files = Array.prototype.slice.call(this.selectorEl.dom.files); - this.selectorEl.dom.reset(); + this.selectorEl.dom.value = '';// hopefully reset.. this.fireEvent('uploaded', this, files ); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index f513d56791..20515d5da2 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2983,7 +2983,7 @@ Roo.extend(Roo.bootstrap.ButtonUploader, Roo.bootstrap.Button, { return; } var files = Array.prototype.slice.call(this.selectorEl.dom.files); - this.selectorEl.dom.reset(); + this.selectorEl.dom.value = '';// hopefully reset.. this.fireEvent('uploaded', this, files ); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 5db9134459..4f571c17a5 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -125,7 +125,8 @@ Roo.bootstrap.CardImageTop=function(A){Roo.bootstrap.CardImageTop.superclass.con Roo.bootstrap.ButtonUploader=function(A){Roo.bootstrap.ButtonUploader.superclass.constructor.call(this,A);this.addEvents({'beforeselect':true,'uploaded':true});};Roo.extend(Roo.bootstrap.ButtonUploader,Roo.bootstrap.Button,{errorTimeout:3000,images:false,fileCollection:false,allowBlank:true,multiple:true,getAutoCreate:function(){var im={tag:'input',type:'file',cls:'d-none roo-card-upload-selector'} ;if(this.multiple){im.multiple='multiple';}return {cls:'div',cn:[Roo.bootstrap.Button.prototype.getAutoCreate.call(this),im]};},initEvents:function(){Roo.bootstrap.Button.prototype.initEvents.call(this);this.urlAPI=(window.createObjectURL&&window)||(window.URL&&URL.revokeObjectURL&&URL)||(window.webkitURL&&webkitURL); this.selectorEl=this.el.select('.roo-card-upload-selector',true).first();this.selectorEl.on('change',this.onFileSelected,this);},onClick:function(e){e.preventDefault();if(this.fireEvent('beforeselect',this)===false){return;}this.selectorEl.dom.click();},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.reset();this.fireEvent('uploaded',this,A);},reset:function(){this.selectorEl}}); +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});};Roo.extend(Roo.bootstrap.Img,Roo.bootstrap.Component,{imgResponsive:true,border:'',src:'about:blank',href:false,target:false,xsUrl:'',smUrl:'',mdUrl:'',lgUrl:'',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; -- 2.39.2