MenuItem: handle disabled file items
This commit is contained in:
parent
e72e68a1df
commit
4c6756c192
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue