Pman.Dialog.AdminEnumImages.bjs
authorbenny <benny@roojs.com>
Thu, 12 Jul 2018 08:11:39 +0000 (16:11 +0800)
committerbenny <benny@roojs.com>
Thu, 12 Jul 2018 08:11:39 +0000 (16:11 +0800)
Pman.Dialog.AdminEnumImages.js

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

index ff26313..a6e93c6 100644 (file)
           },
           {
            "listeners" : {
-            "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\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    console.log(s);\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        "
            },
            "text" : "Edit",
            "xtype" : "Button",
index 0bfbce9..71f6c2e 100644 (file)
@@ -168,6 +168,7 @@ Pman.Dialog.AdminEnumImages = {
            click : function()
             {
                 var s = _this.grid.getSelectionModel().getSelections();
+                console.log(s);
                 if (!s || s.length != 1) {
                     Roo.MessageBox.alert("Error", "Select a single image to edit");
                    return;