This commit is contained in:
rolux 2013-12-06 22:15:04 +01:00
parent a97170ea5b
commit 37ab78f05b
7 changed files with 22 additions and 23 deletions

View file

@ -413,11 +413,11 @@ Ox.load.UI = function(options, callback) {
Ox.UI.PATH = Ox.PATH + 'Ox.UI/';
//@ Ox.UI.SCOLLBAR_SIZE <str> size of scrollbar
Ox.UI.SCROLLBAR_SIZE = $.browser.webkit ? 8 : (function() {
var inner = $('<p>').css({
var inner = Ox.$('<p>').css({
height: '200px',
width: '100%'
}),
outer = $('<div>').css({
outer = Ox.$('<div>').css({
height: '150px',
left: 0,
overflow: 'hidden',
@ -426,8 +426,7 @@ Ox.load.UI = function(options, callback) {
visibility: 'hidden',
width: '200px'
}).append(inner).appendTo($('body')),
width;
width = inner[0].offsetWidth;
width = inner[0].offsetWidth;
outer.css({overflow: 'scroll'});
width = 1 + width - (inner[0].offsetWidth == width
? outer[0].clientWidth : inner[0].offsetWidth);

View file

@ -361,7 +361,7 @@ Ox.Map = function(options, self) {
bottom: 0
})
.appendTo(that);
self.$placeFlag = $('<img>')
self.$placeFlag = Ox.$('<img>')
.addClass('OxFlag')
.attr({
src: Ox.PATH + 'Ox.Geo/png/icons/16/NTHH.png'
@ -1252,7 +1252,7 @@ Ox.Map = function(options, self) {
.data({country: country})
.empty()
.append(
$('<img>').attr({
Ox.$('<img>').attr({
src: Ox.getFlagByGeoname(place.geoname, 16)
})
)
@ -1602,7 +1602,7 @@ Ox.Map = function(options, self) {
self.$placeControls.name.options({title: value});
} else if (key == 'geoname') {
self.$placeControls.flag.empty().append(
$('<img>').attr({
Ox.$('<img>').attr({
src: Ox.getFlagByGeoname(value, 16)
})
);

View file

@ -79,7 +79,7 @@ Ox.MapEditor = function(options, self) {
{
format: function(value, data) {
return data.type
? $('<img>')
? Ox.$('<img>')
.attr({
src: Ox.getFlagByGeoname(data.geoname, 16)
})
@ -121,7 +121,7 @@ Ox.MapEditor = function(options, self) {
}
});
return data.type
? $('<div>')
? Ox.$('<div>')
.addClass('OxTypeIcon')
.css({
width: iconSize + 'px',
@ -148,7 +148,7 @@ Ox.MapEditor = function(options, self) {
format: function(value, data) {
return data.type
? value
: $('<span>').addClass('OxWarning').html(value);
: Ox.$('<span>').addClass('OxWarning').html(value);
},
id: 'name',
operator: '+',
@ -427,7 +427,7 @@ Ox.MapEditor = function(options, self) {
self.$placeTitlebar = Ox.Bar({
size: 24
});
self.$placeTitle = $('<div>')
self.$placeTitle = Ox.$('<div>')
.hide()
.appendTo(self.$placeTitlebar);
if (self.options.mode == 'define') {
@ -443,7 +443,7 @@ Ox.MapEditor = function(options, self) {
.hide()
.appendTo(self.$placeTitle);
}
self.$placeFlag = $('<img>')
self.$placeFlag = Ox.$('<img>')
.addClass('OxFlag')
.attr({
src: Ox.getFlagByGeoname('', 16)

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')
)

View file

@ -49,11 +49,11 @@ Ox.VideoPreview = function(options, self) {
self.loaded = [];
self.queue = [];
self.$frameElement = $('<div>')
self.$frameElement = Ox.$('<div>')
.addClass('OxFrame')
.appendTo(that);
self.$frame = $('<img>')
self.$frame = Ox.$('<img>')
.attr({src: self.options.getFrame(self.options.position)})
.css(getFrameCSS())
.appendTo(self.$frameElement);