Pman.Dialog.AdminCoreEnum.js
},
{
"listeners": {
- "click": "function (_self, e)\n{\n var sel = _this.grid.selModel.getSelectedCell();\n if (!sel) {\n Roo.MessageBox.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 _this.dialog.hide();\n}"
+ "click": "function (_self, e)\n{\n var sel = _this.grid.selModel.getSelectedCell();\n if (!sel && _this.callback) {\n Roo.MessageBox.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 _this.dialog.hide();\n}"
},
"*prop": "buttons[]",
"text": "OK",
click : function (_self, e)
{
var sel = _this.grid.selModel.getSelectedCell();
- if (!sel) {
+ if (!sel && _this.callback) {
Roo.MessageBox.alert("Error", "Select an item");
return;
}