Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.js
index 14918f0..f02e252 100644 (file)
@@ -37,9 +37,12 @@ Pman.Dialog.CoreAutoSavePreview = {
                         _this.grid.footer.onClick('first');
                     }
                     
-                    _this.source = '';
+                    if (!_this.grid.getSelectionModel().getSelected()) {
+                        _this.source = '';
+                        _this.viewPanel.setContent("Please select a version on the left");
+                    }
+                    
                     
-                    _this.viewPanel.setContent("");
                     
                 }
             },
@@ -230,7 +233,7 @@ Pman.Dialog.CoreAutoSavePreview = {
                         
                             _this.dialog.hide();
                             
-                            if (_this.callback) {
+                            if (_this.callback && _this.source != '') {
                                 _this.callback.call(this, _this.source);
                             }
                         }