Pman.Dialog.AdminEnumImages.bjs
authorbenny <benny@roojs.com>
Thu, 12 Jul 2018 05:41:36 +0000 (13:41 +0800)
committerbenny <benny@roojs.com>
Thu, 12 Jul 2018 05:41:36 +0000 (13:41 +0800)
Pman.Dialog.AdminEnumImages.js

Pman.Dialog.AdminEnumImages.bjs
Pman.Dialog.AdminEnumImages.js

index d84961e..2595c82 100644 (file)
           },
           {
            "listeners" : {
-            "|click" : "function()\n{\n    var ids = [];\n    _this.grid.dataSource.each(function(rr) {\n        \n        if (rr.selected) {\n            console.log(rr.data.id);\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.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        "
            },
            "text" : "Delete",
            "xtype" : "Button",
index 8c32f6c..8c61927 100644 (file)
@@ -193,9 +193,9 @@ Pman.Dialog.AdminEnumImages = {
             {
                 var ids = [];
                 _this.grid.dataSource.each(function(rr) {
-                    
+                    console.log(rr.data.id);
                     if (rr.selected) {
-                        console.log(rr.data.id);
+                        
                         ids.push(rr.data.id);
                     }
                 });