From: benny Date: Thu, 12 Jul 2018 08:01:15 +0000 (+0800) Subject: Pman.Dialog.AdminEnumImages.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=a9c40787fefc6a3d058dcb652199845ea8b7a0ac Pman.Dialog.AdminEnumImages.bjs Pman.Dialog.AdminEnumImages.js --- diff --git a/Pman.Dialog.AdminEnumImages.bjs b/Pman.Dialog.AdminEnumImages.bjs index e62d8e2..4f76591 100644 --- a/Pman.Dialog.AdminEnumImages.bjs +++ b/Pman.Dialog.AdminEnumImages.bjs @@ -124,7 +124,7 @@ }, { "listeners" : { - "|click" : "function()\n{\n var ids = [];\n \n var sc = _this.grid.getSelectionModel().getSelection();\n console.log(sc);\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 " + "|click" : "function()\n{\n var ids = [];\n \n var sc = _this.grid.getSelectionModel().getSelections();\n console.log(sc);\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 f14ce9d..ccda606 100644 --- a/Pman.Dialog.AdminEnumImages.js +++ b/Pman.Dialog.AdminEnumImages.js @@ -193,7 +193,7 @@ Pman.Dialog.AdminEnumImages = { { var ids = []; - var sc = _this.grid.getSelectionModel().getSelection(); + var sc = _this.grid.getSelectionModel().getSelections(); console.log(sc); if (!ids.length) { Roo.MessageBox.alert("Error", "Select rows by clicking the row");