From 53a5a22feebada91c02ab458a81aaeca259638d3 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 17 Sep 2014 16:39:30 +0200 Subject: [PATCH] MenuItem: correctly set OxDisabled class --- source/Ox.UI/js/Menu/MenuItem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Menu/MenuItem.js b/source/Ox.UI/js/Menu/MenuItem.js index 37d03df7..f9ab9d1c 100644 --- a/source/Ox.UI/js/Menu/MenuItem.js +++ b/source/Ox.UI/js/Menu/MenuItem.js @@ -48,7 +48,9 @@ Ox.MenuItem = function(options, self) { that.$status.html(self.options.checked ? Ox.UI.symbols.check : '') }, disabled: function() { - that.toggleClass('OxDisabled'); + that[ + self.options.disabled ? 'addClass' : 'removeClass' + ]('OxDisabled'); self.options.file && that.$button.options({ disabled: self.options.disabled });