From dae2f6a686755e6523132bc2e1de8886d71a41cf Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 8 May 2014 18:59:24 +0800 Subject: [PATCH] Pman.Dialog.CoreAutoSavePreview.bjs Pman.Dialog.CoreAutoSavePreview.js --- Pman.Dialog.CoreAutoSavePreview.bjs | 2 +- Pman.Dialog.CoreAutoSavePreview.js | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Pman.Dialog.CoreAutoSavePreview.bjs b/Pman.Dialog.CoreAutoSavePreview.bjs index 78a8f9bc..8aae9102 100644 --- a/Pman.Dialog.CoreAutoSavePreview.bjs +++ b/Pman.Dialog.CoreAutoSavePreview.bjs @@ -57,7 +57,7 @@ "items": [ { "listeners": { - "afterselectionchange": "function (_self)\n{\n var selected = this.getSelected();\n \n if (!selected) {\n _this.viewPanel.setContent(\"Nothing Selected\");\n return;\n }\n \n _this.viewPanel.load( { url : baseURL + \"/Roo/Events\", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){\n \n _this.source = '';\n \n var res = Roo.decode(oResponse.responseText);\n \n if(!bSuccess || !res.success){\n _this.viewPanel.setContent(\"Load data failed?!\");\n }\n \n if(typeof(res.data) === 'string'){\n _this.viewPanel.setContent(res.data);\n return;\n }\n \n if(!_this.data.successFn){\n Roo.MessageBox.alert('Error', 'Please setup the successFn');\n return;\n }\n \n _this.source = _this.data.successFn(res);\n\n _this.viewPanel.setContent(_this.source);\n \n });\n}" + "afterselectionchange": "function (_self)\n{\n var selected = this.getSelected();\n \n _this.viewPanel.load( { url : baseURL + \"/Roo/Events\", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){\n \n _this.source = '';\n \n var res = Roo.decode(oResponse.responseText);\n \n if(!bSuccess || !res.success){\n _this.viewPanel.setContent(\"Load data failed?!\");\n }\n \n if(typeof(res.data) === 'string'){\n _this.viewPanel.setContent(res.data);\n return;\n }\n \n if(!_this.data.successFn){\n Roo.MessageBox.alert('Error', 'Please setup the successFn');\n return;\n }\n \n _this.source = _this.data.successFn(res);\n\n _this.viewPanel.setContent(_this.source);\n \n });\n}" }, "*prop": "sm", "singleSelect": true, diff --git a/Pman.Dialog.CoreAutoSavePreview.js b/Pman.Dialog.CoreAutoSavePreview.js index 699726c5..2249792c 100644 --- a/Pman.Dialog.CoreAutoSavePreview.js +++ b/Pman.Dialog.CoreAutoSavePreview.js @@ -88,11 +88,6 @@ Pman.Dialog.CoreAutoSavePreview = { { var selected = this.getSelected(); - if (!selected) { - _this.viewPanel.setContent("Nothing Selected"); - return; - } - _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){ _this.source = ''; -- 2.39.2