forked from 0x2620/oxjs
swap the meaning of makeArray and toArray: makeArray, like makeObject, is a helper function for arguments processing (that wraps any non-array in an array), toArray, like in other libraries, is an alias for Array.prototype.slice.call
This commit is contained in:
parent
5cabb679f9
commit
5692195509
21 changed files with 88 additions and 88 deletions
|
|
@ -41,7 +41,7 @@ Ox.MenuItem = function(options, self) {
|
|||
})
|
||||
.options(Ox.extend(Ox.clone(options), {
|
||||
keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard),
|
||||
title: Ox.toArray(options.title || self.defaults.title)
|
||||
title: Ox.makeArray(options.title || self.defaults.title)
|
||||
}))
|
||||
.addClass('OxItem' + (self.options.disabled ? ' OxDisabled' : ''))
|
||||
/*
|
||||
|
|
@ -135,7 +135,7 @@ Ox.MenuItem = function(options, self) {
|
|||
} else if (key == 'disabled') {
|
||||
that.toggleClass('OxDisabled');
|
||||
} else if (key == 'title') {
|
||||
self.options.title = Ox.toArray(value);
|
||||
self.options.title = Ox.makeArray(value);
|
||||
that.$title.html(self.options.title[0]);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue