MenuItem: handle disabled file items

This commit is contained in:
rolux 2012-06-27 12:54:46 +02:00
parent e72e68a1df
commit 4c6756c192

View file

@ -49,6 +49,9 @@ Ox.MenuItem = function(options, self) {
}, },
disabled: function() { disabled: function() {
that.toggleClass('OxDisabled'); that.toggleClass('OxDisabled');
self.options.file && that.$button.options({
disabled: self.options.disabled
});
}, },
title: function() { title: function() {
self.options.title = Ox.makeArray(self.options.title); self.options.title = Ox.makeArray(self.options.title);
@ -93,6 +96,7 @@ Ox.MenuItem = function(options, self) {
self.options.file self.options.file
? ?
that.$button = Ox.FileButton(Ox.extend({ that.$button = Ox.FileButton(Ox.extend({
disabled: self.options.disabled,
title: self.options.title[0] title: self.options.title[0]
}, self.options.file)).bindEvent({ }, self.options.file)).bindEvent({
click: function(data) { click: function(data) {