Commit cb5711a9 authored by Dietmar Maurer's avatar Dietmar Maurer

fix button enable/disable code

parent 08d62c4e
......@@ -55,8 +55,7 @@ Ext.define('PVE.button.Button', {
me.mon(me.selModel, "selectionchange", function() {
var rec = me.selModel.getSelection()[0];
var enable = me.enableFn(rec);
if (Ext.isDefined(enable) && enable === false) {
if (!rec || (me.enableFn(rec) === false)) {
me.setDisabled(true);
} else {
me.setDisabled(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment