diff --git a/source/Ox.UI/js/Menu/Ox.MenuItem.js b/source/Ox.UI/js/Menu/Ox.MenuItem.js
index 5afd74af..c5445f91 100644
--- a/source/Ox.UI/js/Menu/Ox.MenuItem.js
+++ b/source/Ox.UI/js/Menu/Ox.MenuItem.js
@@ -28,6 +28,7 @@ Ox.MenuItem = function(options, self) {
bind: [], // fixme: what's this?
checked: null,
disabled: false,
+ file: false,
group: '',
icon: '',
id: '',
@@ -56,47 +57,53 @@ Ox.MenuItem = function(options, self) {
// construct
that.append(
- that.$status = $('
', {
- 'class': 'OxCell OxStatus',
- html: self.options.checked ? Ox.UI.symbols.check : ''
- })
+ that.$status = $(' | ')
+ .addClass('OxCell OxStatus')
+ .html(self.options.checked ? Ox.UI.symbols.check : '')
)
.append(
- that.$icon = $(' | ', {
- 'class': 'OxCell OxIcon'
- })
- .append(self.options.icon
- ? $('', {src: self.options.icon}) : null
- )
+ that.$icon = $(' | ')
+ .addClass('OxCell OxIcon')
+ .append(
+ self.options.icon
+ ? $('').attr({src: self.options.icon})
+ : null
+ )
)
.append(
- that.$title = $(' | ', {
- 'class': 'OxCell OxTitle',
- css: self.options.maxWidth
+ that.$title = $(' | ')
+ .addClass('OxCell OxTitle')
+ .css(
+ self.options.maxWidth
? {maxWidth: self.options.maxWidth - 46}
- : {},
- html: Ox.isString(self.options.title[0])
+ : {}
+ )
+ .html(
+ Ox.isString(self.options.title[0])
? self.options.title[0]
: $(' ').html(self.options.title[0]).html()
- })
+ )
)
.append(
- $(' | ', {
- 'class': 'OxCell OxModifiers',
- html: self.options.keyboard.modifiers.map(function(modifier) {
- return Ox.UI.symbols[modifier];
- }).join('')
- })
+ $(' | ')
+ .addClass('OxCell OxModifiers')
+ .html(
+ self.options.keyboard.modifiers.map(function(modifier) {
+ return Ox.UI.symbols[modifier];
+ }).join('')
+ )
)
.append(
- $(' | ', {
- 'class': 'OxCell Ox'
- + (self.options.items.length ? 'Submenu' : 'Key'),
- html: self.options.items.length
+ $(' | ')
+ .addClass(
+ 'OxCell Ox' + (self.options.items.length ? 'Submenu' : 'Key')
+ )
+ .html(
+ self.options.items.length
? Ox.UI.symbols.triangle_right
: Ox.UI.symbols[self.options.keyboard.key]
- || self.options.keyboard.key.toUpperCase()
- })
+ || self.options.keyboard.key.toUpperCase()
+ )
);
function parseKeyboard(str) {
|