From 6fe363e20af6e6bc80bf234f56d3188bd1db2d6a Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 5 Mar 2021 15:01:24 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/CardUploader.js --- Roo/bootstrap/CardUploader.js | 5 +++-- roojs-bootstrap-debug.js | 1 + roojs-bootstrap.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/CardUploader.js b/Roo/bootstrap/CardUploader.js index 6cc9e2e76b..8d92f27390 100644 --- a/Roo/bootstrap/CardUploader.js +++ b/Roo/bootstrap/CardUploader.js @@ -324,9 +324,10 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, { var ee = Roo.apply({}, fc[i]); ee.src = evt.target.result; data.push(ee); - + i++; + next(); }; - reader.readAsDataURL(fc[i].src); + reader.readAsDataURL(fc[i].src); } next(); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 4183233c1c..d4754e8fa7 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -12799,6 +12799,7 @@ Roo.extend(Roo.bootstrap.CardUploader, Roo.bootstrap.Input, { reader.readAsDataURL(fc[i].src); } + next(); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 2efdd7117a..06dc1aa1cf 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -531,7 +531,7 @@ this.selectorEl=this.el.select('.roo-card-upload-selector',true).first();this.se this.imgEl=this.el.select('.card-img-top').first();if(this.imgEl){this.imgEl.on('click',function(){t.previewCard(A.id);},this);this.imgEl.set({'pointer':'cursor'});}}});this.fileCollection.add(cn);this.updateInput();},removeCard:function(id){var A=this.fileCollection.get(id); A.data.is_deleted=1;A.data.src='';this.fileCollection.remove(A);A.el.dom.parentNode.removeChild(A.el.dom);},reset:function(){this.fileCollection.each(function(A){A.el.dom.parentNode.removeChild(A.el.dom);});this.fileCollection.clear();this.updateInput();} ,updateInput:function(){var i=0;var A=[];var B=this.inputEl().dom;var fc=this.fileCollection;var C=function(){if(i>=fc.length){B.value=JSON.stringify(A);return;}var D=new FileReader();D.onloadend=function(E){var ee=Roo.apply({},fc[i]);ee.src=E.target.result; -A.push(ee);};D.readAsDataURL(fc[i].src);}}});Roo.bootstrap.CardUploader.ID=-1; +A.push(ee);};D.readAsDataURL(fc[i].src);};C();}});Roo.bootstrap.CardUploader.ID=-1; // Roo/data/SortTypes.js Roo.data.SortTypes={none:function(s){return s;},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return String(s).replace(this.stripTagsRE,"");},asUCText:function(s){return String(s).toUpperCase().replace(this.stripTagsRE,"");},asUCString:function(s){return String(s).toUpperCase(); },asDate:function(s){if(!s){return 0;}if(s instanceof Date){return s.getTime();}return Date.parse(String(s));},asFloat:function(s){var A=parseFloat(String(s).replace(/,/g,""));if(isNaN(A)){A=0;}return A;},asInt:function(s){var A=parseInt(String(s).replace(/,/g,"")); -- 2.39.2