Pman.Dialog.Image.bjs
[Pman.Core] / Pman.Dialog.Image.js
index d9b9190..165816a 100644 (file)
@@ -57,11 +57,17 @@ Pman.Dialog.Image = {
                if (!dlg.haveProgress) {
                     Roo.MessageBox.progress("Uploading", "Uploading");
                 }
+                
+                if (dlg.haveProgress == 2) {
+                    // it's been closed elsewhere..
+                    return;
+                }
                 if (dlg.uploadComplete) {
                     Roo.MessageBox.hide();
                     return;
                 }
-                dlg.haveProgress = true;
+                
+                dlg.haveProgress = 1;
             
                 var uid = _this.form.findField('UPLOAD_IDENTIFIER').getValue();
                 Pman.request({
@@ -146,17 +152,18 @@ Pman.Dialog.Image = {
                                     // error msg???
                                     
                                     if (act.type == 'submit') {
-                                        Roo.log(act);
+                                        //Roo.log(act);
                                         try {
                                             Roo.MessageBox.alert("Error", act.result.errorMsg);
                                         } catch(e) {
+                                          //  Roo.log(e);
                                             Roo.MessageBox.alert("Error", "Saving failed = fix errors and try again");        
                                         }
                                         return;
                                     }
                                     
                                     // what about load failing..
-                                    Ext.MessageBox.alert("Error", "Error loading details"); 
+                                    Roo.MessageBox.alert("Error", "Error loading details"); 
                                 }
                             },
                             fileUpload : true,