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', { ...@@ -55,8 +55,7 @@ Ext.define('PVE.button.Button', {
me.mon(me.selModel, "selectionchange", function() { me.mon(me.selModel, "selectionchange", function() {
var rec = me.selModel.getSelection()[0]; var rec = me.selModel.getSelection()[0];
var enable = me.enableFn(rec); if (!rec || (me.enableFn(rec) === false)) {
if (Ext.isDefined(enable) && enable === false) {
me.setDisabled(true); me.setDisabled(true);
} else { } else {
me.setDisabled(false); 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