MenuItem: correctly set OxDisabled class

This commit is contained in:
rlx 2014-09-17 16:39:30 +02:00
parent 77be06d73d
commit 53a5a22fee

View file

@ -48,7 +48,9 @@ Ox.MenuItem = function(options, self) {
that.$status.html(self.options.checked ? Ox.UI.symbols.check : '') that.$status.html(self.options.checked ? Ox.UI.symbols.check : '')
}, },
disabled: function() { disabled: function() {
that.toggleClass('OxDisabled'); that[
self.options.disabled ? 'addClass' : 'removeClass'
]('OxDisabled');
self.options.file && that.$button.options({ self.options.file && that.$button.options({
disabled: self.options.disabled disabled: self.options.disabled
}); });