Pman.Dialog.Image.bjs
[Pman.Core] / Pman.Dialog.Image.js
index aaf12aa..b50d4b4 100644 (file)
@@ -78,6 +78,12 @@ Pman.Dialog.Image = {
                     method: 'GET',
                     success : function(data){
                         //console.log(data);
+                        
+                        if (dlg.haveProgress == 2) {
+                            // it's been closed elsewhere..
+                            return;
+                        }
+                        
                         if (dlg.uploadComplete) {
                             Roo.MessageBox.hide();
                             return;
@@ -111,7 +117,7 @@ Pman.Dialog.Image = {
                                 actioncomplete : function(_self,act)
                                 {
                                     _this.dialog.uploadComplete = true;
-                                    _this.haveProgress = 2; 
+                                    _this.dialog.haveProgress = 2; 
                                     Roo.MessageBox.hide(); // force hiding
                                     _this.dialog.el.unmask();
                                      
@@ -152,9 +158,10 @@ Pman.Dialog.Image = {
                                     _this.dialog.uploadComplete = true;
                                     _this.dialog.el.unmask();
                                     // error msg???
-                                    
+                                     _this.dialog.haveProgress = 2; 
                                     if (act.type == 'submit') {
-                                        //Roo.log(act);
+                                        Roo.log("Upload error");
+                                        Roo.log(act);
                                         try {
                                             Roo.MessageBox.alert("Error", act.result.errorMsg);
                                         } catch(e) {