Roo/bootstrap/DocumentManager.js
authoredward <edward@roojs.com>
Tue, 15 Mar 2016 02:41:02 +0000 (10:41 +0800)
committeredward <edward@roojs.com>
Tue, 15 Mar 2016 02:41:02 +0000 (10:41 +0800)
Roo/bootstrap/DocumentManager.js

index 7c92018..56e2b97 100644 (file)
@@ -490,14 +490,17 @@ Roo.extend(Roo.bootstrap.DocumentManager, Roo.bootstrap.Component,  {
     
     process : function(file)
     {
-        if(this.editable && file.type.indexOf('image') != -1){
-            this.fireEvent('edit', this, file);
+        if(this.fireEvent('process', this, file) !== false){
+            if(this.editable && file.type.indexOf('image') != -1){
+                this.fireEvent('edit', this, file);
+                return;
+            }
+
+            this.uploadStart(file, false);
+
             return;
         }
         
-        this.uploadStart(file, false);
-        
-        return;
     },
     
     uploadStart : function(file, crop)