Pman.Dialog.AdminCoreEnum.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 15 Oct 2013 07:31:29 +0000 (15:31 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Oct 2013 07:31:29 +0000 (15:31 +0800)
Pman.Dialog.AdminCoreEnum.js

Pman.Dialog.AdminCoreEnum.bjs
Pman.Dialog.AdminCoreEnum.js

index 85c6ca4..095979c 100644 (file)
                     "|xns": "Roo"
                 },
                 {
+                    "listeners": {
+                        "click": "function (_self, e)\n{\n    var sel = _this.grid.selModel.getSelectedCell();\n    if (!sel) {\n        Roo.MesssageBox.alert(\"Error\", \"Select an item\");\n        return;\n    }\n    var rec = _this.grid.getAt(sel[0]);\n    if (_this.callback) {\n       _this.callback(rec.data);\n   }\n}"
+                    },
                     "*prop": "buttons[]",
                     "text": "OK",
                     "xtype": "Button",
index ef722a3..01d764b 100644 (file)
@@ -336,6 +336,20 @@ Pman.Dialog.AdminCoreEnum = {
                 {
                     xtype: 'Button',
                     xns: Roo,
+                    listeners : {
+                        click : function (_self, e)
+                        {
+                            var sel = _this.grid.selModel.getSelectedCell();
+                            if (!sel) {
+                                Roo.MesssageBox.alert("Error", "Select an item");
+                                return;
+                            }
+                            var rec = _this.grid.getAt(sel[0]);
+                            if (_this.callback) {
+                               _this.callback(rec.data);
+                           }
+                        }
+                    },
                     text : "OK"
                 }
             ]