1
0
Fork 0
forked from 0x2620/oxjs
This commit is contained in:
rolux 2013-12-06 22:15:04 +01:00
commit 37ab78f05b
7 changed files with 22 additions and 23 deletions

View file

@ -37,7 +37,7 @@ Ox.MainMenu = function(options, self) {
});
if (self.options.extras.length) {
that.extras = $('<div>')
that.extras = Ox.$('<div>')
.addClass('OxExtras')
.appendTo(that);
self.options.extras.forEach(function(extra) {
@ -49,7 +49,7 @@ Ox.MainMenu = function(options, self) {
that.titles[position] = $('<div>')
.addClass('OxTitle')
.html(menu.title)
.data('position', position);
.data({position: position});
if (position == 0) {
if (that.titles.length == 1) {
that.titles[position].appendTo(that);

View file

@ -66,7 +66,7 @@ Ox.MenuButton = function(options, self) {
});
if (self.options.type == 'text') {
self.$title = $('<div>')
self.$title = Ox.$('<div>')
.addClass('OxTitle')
.css({width: self.options.width - 24 + 'px'})
.html(self.options.title)

View file

@ -71,7 +71,7 @@ Ox.MenuItem = function(options, self) {
}
that.append(
that.$status = $('<td>')
that.$status = Ox.$('<td>')
.addClass('OxCell OxStatus')
.html(self.options.checked ? Ox.UI.symbols.check : '')
)
@ -80,12 +80,12 @@ Ox.MenuItem = function(options, self) {
.addClass('OxCell OxIcon')
.append(
self.options.icon
? $('<img>').attr({src: self.options.icon})
? Ox.$('<img>').attr({src: self.options.icon})
: null
)
)
.append(
that.$title = $('<td>')
that.$title = Ox.$('<td>')
.addClass('OxCell OxTitle')
.css(
self.options.maxWidth
@ -110,12 +110,12 @@ Ox.MenuItem = function(options, self) {
: (
Ox.isString(self.options.title[0])
? self.options.title[0]
: $('<div>').html(self.options.title[0]).html()
: Ox.$('<div>').html(self.options.title[0]).html()
)
)
)
.append(
that.$modifiers = $('<td>')
that.$modifiers = Ox.$('<td>')
.addClass('OxCell OxModifiers')
.html(
self.options.keyboard.modifiers.map(function(modifier) {
@ -124,7 +124,7 @@ Ox.MenuItem = function(options, self) {
)
)
.append(
that.$key = $('<td>')
that.$key = Ox.$('<td>')
.addClass(
'OxCell Ox' + (self.options.items.length ? 'Submenu' : 'Key')
)