Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.js
index 103f073..56fc947 100644 (file)
@@ -104,13 +104,13 @@ Pman.Dialog.CoreAutoSavePreview = {
                                             _this.viewPanel.setContent("Load data failed?!");
                                         }
                                 
-                                        if(typeof(res.data) !== 'string'){
+                                        if(typeof(res.data) === 'string'){
                                             _this.viewPanel.setContent(res.data);
                                             return;
                                         }
                                         
                                         _this.source = res.data.POST.source;
-                                        Roo.log(_this.source);
+                                
                                         _this.viewPanel.setContent(_this.source);
                                         
                                     });
@@ -220,7 +220,12 @@ Pman.Dialog.CoreAutoSavePreview = {
                     xns: Roo,
                     listeners : {
                         click : function() {
+                        
                             _this.dialog.hide();
+                            
+                            if (_this.callback) {
+                                _this.callback.call(this, act.result.data);
+                            }
                         }
                     },
                     text : "OK"