From 8536dafe7b61c398d3de7fe665e27bbc472d4741 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 8 May 2014 19:04:53 +0800 Subject: [PATCH] Pman.Dialog.CoreAutoSavePreview.bjs Pman.Dialog.CoreAutoSavePreview.js --- Pman.Dialog.CoreAutoSavePreview.bjs | 2 +- Pman.Dialog.CoreAutoSavePreview.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Pman.Dialog.CoreAutoSavePreview.bjs b/Pman.Dialog.CoreAutoSavePreview.bjs index 953ac400..d7438423 100644 --- a/Pman.Dialog.CoreAutoSavePreview.bjs +++ b/Pman.Dialog.CoreAutoSavePreview.bjs @@ -7,7 +7,7 @@ "items": [ { "listeners": { - "show": "function (_self)\n{\n if(typeof(_this.data) != 'undefined'){\n _this.grid.footer.onClick('first');\n }\n \n _this.source = '';\n \n _this.viewPanel.setContent(\"Please select a version on the left\");\n \n}" + "show": "function (_self)\n{\n if(typeof(_this.data) != 'undefined'){\n _this.grid.footer.onClick('first');\n }\n \n if (!_this.grid.getSelectionModel().getSelected()) {\n _this.source = '';\n _this.viewPanel.setContent(\"Please select a version on the left\");\n }\n \n \n \n}" }, "background": false, "closable": false, diff --git a/Pman.Dialog.CoreAutoSavePreview.js b/Pman.Dialog.CoreAutoSavePreview.js index 78f34210..f02e252b 100644 --- a/Pman.Dialog.CoreAutoSavePreview.js +++ b/Pman.Dialog.CoreAutoSavePreview.js @@ -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("Please select a version on the left"); } }, -- 2.39.2