From d8ad1699f7fa6a531cf3b6cd58858ce991d474b4 Mon Sep 17 00:00:00 2001 From: benny Date: Thu, 12 Jul 2018 13:44:12 +0800 Subject: [PATCH] Pman.Dialog.AdminEnumImages.bjs Pman.Dialog.AdminEnumImages.js --- Pman.Dialog.AdminEnumImages.bjs | 2 +- Pman.Dialog.AdminEnumImages.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pman.Dialog.AdminEnumImages.bjs b/Pman.Dialog.AdminEnumImages.bjs index 2595c82..da71f4b 100644 --- a/Pman.Dialog.AdminEnumImages.bjs +++ b/Pman.Dialog.AdminEnumImages.bjs @@ -124,7 +124,7 @@ }, { "listeners" : { - "|click" : "function()\n{\n var ids = [];\n _this.grid.dataSource.each(function(rr) {\n console.log(rr.data.id);\n if (rr.selected) {\n \n ids.push(rr.data.id);\n }\n }); \n if (!ids.length) {\n Roo.MessageBox.alert(\"Error\", \"Select rows by clicking on the Internal# column\");\n return;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Confirm Deletion of selected rows (some rows can not be deleted if they are referenced elsewhere\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/Core_enum',\n params : {\n _delete : ids.join(',')\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n });\n }\n );\n}\n " + "|click" : "function()\n{\n var ids = [];\n _this.grid.dataSource.each(function(rr) {\n console.log(rr.selected.data.id);\n if (rr.selected) {\n \n ids.push(rr.data.id);\n }\n }); \n if (!ids.length) {\n Roo.MessageBox.alert(\"Error\", \"Select rows by clicking the row\");\n return;\n }\n \n Roo.MessageBox.confirm(\n \"Confirm\", \n \"Confirm Deletion of selected rows (some rows can not be deleted if they are referenced elsewhere\", \n function(res) {\n if(res != 'yes') {\n return;\n }\n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/Core_enum',\n params : {\n _delete : ids.join(',')\n },\n success : function() {\n _this.grid.footer.onClick('refresh');\n }\n });\n }\n );\n}\n " }, "text" : "Delete", "xtype" : "Button", diff --git a/Pman.Dialog.AdminEnumImages.js b/Pman.Dialog.AdminEnumImages.js index 8c61927..e4b9e17 100644 --- a/Pman.Dialog.AdminEnumImages.js +++ b/Pman.Dialog.AdminEnumImages.js @@ -193,14 +193,14 @@ Pman.Dialog.AdminEnumImages = { { var ids = []; _this.grid.dataSource.each(function(rr) { - console.log(rr.data.id); + console.log(rr.selected.data.id); if (rr.selected) { ids.push(rr.data.id); } }); if (!ids.length) { - Roo.MessageBox.alert("Error", "Select rows by clicking on the Internal# column"); + Roo.MessageBox.alert("Error", "Select rows by clicking the row"); return; } -- 2.39.2