roojs-bootstrap.js
authoredward <edward@roojs.com>
Fri, 20 Oct 2017 08:03:34 +0000 (16:03 +0800)
committeredward <edward@roojs.com>
Fri, 20 Oct 2017 08:03:34 +0000 (16:03 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index e1712b3..69784cf 100644 (file)
@@ -27880,7 +27880,7 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
         
         this.arrange();
         
-        this.fireEvent('onUpload', this, xhr);
+        this.fireEvent('afterupload', this, xhr);
         
     },
     
index 8ec2012..7fc4d2b 100644 (file)
@@ -1169,7 +1169,7 @@ A();},refresh:function(){this.uploader.show();if(this.boxes>0&&this.files.length
 },remove:function(o){var A=[];Roo.each(this.files,function(B){if(typeof(B.id)=='undefined'||B.id*1<1||B.id!=o.id){A.push(B);return;}o.target.remove();},this);this.files=A;this.refresh();},clear:function(){Roo.each(this.files,function(A){if(!A.target){return;
 }A.target.remove();},this);this.files=[];this.refresh();},onClick:function(e,el,o){e.preventDefault();this.fireEvent('click',this,o);},closable:function(A){Roo.each(this.managerEl.select('.roo-document-manager-preview > button.close',true).elements,function(el){el.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';
 if(A){el.show();return;}el.hide();},this);},xhrOnLoad:function(A){Roo.each(this.managerEl.select('.roo-document-manager-loading',true).elements,function(el){el.remove();},this);if(A.readyState!==4){this.arrange();this.fireEvent('exception',this,A);return;
-}var B=Roo.decode(A.responseText);if(!B.success){this.arrange();this.fireEvent('exception',this,A);return;}var C=this.renderPreview(B.data);this.files.push(C);this.arrange();this.fireEvent('onUpload',this,A);},xhrOnError:function(A){Roo.log('xhr on error');
+}var B=Roo.decode(A.responseText);if(!B.success){this.arrange();this.fireEvent('exception',this,A);return;}var C=this.renderPreview(B.data);this.files.push(C);this.arrange();this.fireEvent('afterupload',this,A);},xhrOnError:function(A){Roo.log('xhr on error');
 var B=Roo.decode(A.responseText);Roo.log(B);this.arrange();},process:function(A){if(this.fireEvent('process',this,A)!==false){if(this.editable&&A.type.indexOf('image')!=-1){this.fireEvent('edit',this,A);return;}this.uploadStart(A,false);return;}},uploadStart:function(A,B){this.xhr=new XMLHttpRequest();
 if(typeof(A.id)!='undefined'&&A.id*1>0){this.arrange();return;}A.xhr=this.xhr;this.managerEl.createChild({tag:'div',cls:'roo-document-manager-loading',cn:[{tag:'div',tooltip:A.name,cls:'roo-document-manager-thumb',html:'<i class="fa fa-circle-o-notch fa-spin"></i>'}
 ]});this.xhr.open(this.method,this.url,true);var C={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var D in C){var E=C[D];if(E){this.xhr.setRequestHeader(D,E);}}var F=this;this.xhr.onload=function(){F.xhrOnLoad(F.xhr);