From cf3720addd7b85cd41873ec62e4e5d850ad99b11 Mon Sep 17 00:00:00 2001 From: benny Date: Thu, 12 Jul 2018 16:28:37 +0800 Subject: [PATCH] Pman.Dialog.AdminEnumImages.bjs Pman.Dialog.AdminEnumImages.js --- Pman.Dialog.AdminEnumImages.bjs | 2 +- Pman.Dialog.AdminEnumImages.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Pman.Dialog.AdminEnumImages.bjs b/Pman.Dialog.AdminEnumImages.bjs index 61290fe..791478f 100644 --- a/Pman.Dialog.AdminEnumImages.bjs +++ b/Pman.Dialog.AdminEnumImages.bjs @@ -114,7 +114,7 @@ }, { "listeners" : { - "|click" : "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n \n if (!s || s.length != 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a single image to edit\");\n return;\n }\n var data = _this.grid.getDataSource().getById(s[0].data.id).data;\n \n Pman.Dialog.Image.show(data, function() {\n _this.grid.footer.onClick('first');\n });\n \n }\n " + "|click" : "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n \n if (!s || s.length != 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a single image to edit\");\n return;\n }\n var data = _this.grid.getDataSource().getById(s[0].data.id).data;\n \n if (!_this.dialog) {\n return;\n }\n _this.dialog.show(s[0].data, function() {\n _this.grid.ds.load({});\n }); \n \n}\n\n " }, "text" : "Edit", "xtype" : "Button", diff --git a/Pman.Dialog.AdminEnumImages.js b/Pman.Dialog.AdminEnumImages.js index 01d89b5..b646866 100644 --- a/Pman.Dialog.AdminEnumImages.js +++ b/Pman.Dialog.AdminEnumImages.js @@ -175,11 +175,14 @@ Pman.Dialog.AdminEnumImages = { } var data = _this.grid.getDataSource().getById(s[0].data.id).data; - Pman.Dialog.Image.show(data, function() { - _this.grid.footer.onClick('first'); - }); + if (!_this.dialog) { + return; + } + _this.dialog.show(s[0].data, function() { + _this.grid.ds.load({}); + }); - } + } }, xns : Roo, '|xns' : 'Roo' -- 2.39.2