1
0
Fork 0
forked from 0x2620/oxjs

Ox.UI -> Ox

This commit is contained in:
rlx 2014-09-25 18:35:17 +02:00
commit 775aa607c8
13 changed files with 31 additions and 31 deletions

View file

@ -34,7 +34,7 @@ Ox.CustomList = function(options, self) {
self.$list.options({items: self.options.items});
},
itemWidth: function() {
var width = self.options.itemWidth - Ox.UI.SCROLLBAR_SIZE;
var width = self.options.itemWidth - Ox.SCROLLBAR_SIZE;
if (self.options.resize) {
that.find('.OxItem').each(function(element) {
self.options.resize($(this), width);
@ -58,13 +58,13 @@ Ox.CustomList = function(options, self) {
self.$list = Ox.List({
construct: function(data) {
return self.options.item(
data, self.options.itemWidth - Ox.UI.SCROLLBAR_SIZE
data, self.options.itemWidth - Ox.SCROLLBAR_SIZE
).addClass('OxTarget');
},
draggable: self.options.draggable,
itemHeight: self.options.itemHeight,
itemWidth: self.options.itemWidth
- self.options.scrollbarVisible * Ox.UI.SCROLLBAR_SIZE,
- self.options.scrollbarVisible * Ox.SCROLLBAR_SIZE,
items: self.options.items,
keys: self.options.keys.concat(self.options.unique),
max: self.options.max,

View file

@ -46,7 +46,7 @@ Ox.IconItem = function(options, self) {
infoIsObject: Ox.isObject(self.options.info),
lineLength: self.options.itemWidth == 64 ? 15 : 23,
lines: self.options.itemWidth == 64 ? 4 : 5,
url: Ox.UI.PATH + 'png/transparent.png'
url: Ox.UI_PATH + 'png/transparent.png'
});
self.title = formatText(self.options.title, self.lines - 1 - self.infoIsObject, self.lineLength);

View file

@ -167,9 +167,9 @@ Ox.InfoList = function(options, self) {
function getItemWidth(cached) {
if (!cached) {
self.cachedWidth = self.$list.width() - Ox.UI.SCROLLBAR_SIZE;
self.cachedWidth = self.$list.width() - Ox.SCROLLBAR_SIZE;
} else if (!self.cachedWidth || self.cachedWidthTime < +new Date() - 5000) {
self.cachedWidth = self.$list.width() - Ox.UI.SCROLLBAR_SIZE;
self.cachedWidth = self.$list.width() - Ox.SCROLLBAR_SIZE;
self.cachedWidthTime = +new Date();
}
return self.cachedWidth;

View file

@ -594,7 +594,7 @@ Ox.List = function(options, self) {
return that.height() - (
!self.options.disableHorizontalScrolling
&& that.$content.width() > that.width()
? Ox.UI.SCROLLBAR_SIZE : 0
? Ox.SCROLLBAR_SIZE : 0
);
}
@ -782,7 +782,7 @@ Ox.List = function(options, self) {
function getWidth() {
//Ox.Log('List', 'LIST THAT.WIDTH()', that.width())
return that.width() - (
that.$content.height() > that.height() ? Ox.UI.SCROLLBAR_SIZE : 0
that.$content.height() > that.height() ? Ox.SCROLLBAR_SIZE : 0
);
}

View file

@ -206,7 +206,7 @@ Ox.TableList = function(options, self) {
.addClass('OxHead')
.css({
right: self.options.scrollbarVisible
? Ox.UI.SCROLLBAR_SIZE + 'px' : 0
? Ox.SCROLLBAR_SIZE + 'px' : 0
})
.appendTo(that.$bar);
that.$head.$content.addClass('OxTitles');
@ -232,7 +232,7 @@ Ox.TableList = function(options, self) {
return column.id;
})
})
.css(Ox.UI.SCROLLBAR_SIZE == 16 ? {
.css(Ox.SCROLLBAR_SIZE == 16 ? {
right: 0,
width: '14px'
} : {
@ -241,7 +241,7 @@ Ox.TableList = function(options, self) {
})
.bindEvent('change', changeColumns)
.appendTo(that.$bar);
Ox.UI.SCROLLBAR_SIZE < 16 && $(that.$select.find('input')[0]).css({
Ox.SCROLLBAR_SIZE < 16 && $(that.$select.find('input')[0]).css({
marginRight: '-3px',
marginTop: '1px',
width: '8px',
@ -254,7 +254,7 @@ Ox.TableList = function(options, self) {
})
.addClass('OxClear')
.attr({src: Ox.getImageURL('symbolClose')})
.css(Ox.UI.SCROLLBAR_SIZE == 16 ? {
.css(Ox.SCROLLBAR_SIZE == 16 ? {
paddingLeft: '4px',
paddingRight: '2px',
marginRight: 0
@ -777,7 +777,7 @@ Ox.TableList = function(options, self) {
return Math.max(
Ox.sum(self.columnWidths),
self.cachedWidth -
(self.options.scrollbarVisible ? Ox.UI.SCROLLBAR_SIZE : 0)
(self.options.scrollbarVisible ? Ox.SCROLLBAR_SIZE : 0)
);
}
@ -950,14 +950,14 @@ Ox.TableList = function(options, self) {
// FIXME: not yet used
that.$body.find('img').each(function(i, element) {
var $element = $(element),
data = Ox.UI.getImageData($element.attr('src'));
data = Ox.getImageData($element.attr('src'));
if (data && data.color == 'selected') {
$element.attr({src: Ox.getImageURL(data.name, 'default')});
}
});
that.$body.find('.OxSelected img').each(function(i, element) {
var $element = $(element),
data = Ox.UI.getImageData($element.attr('src'));
data = Ox.getImageData($element.attr('src'));
if (data && data.color == 'default') {
$element.attr({src: Ox.getImageURL(data.name, 'selected')});
}

View file

@ -94,7 +94,7 @@ Ox.TreeList = function(options, self) {
function constructItem(data) {
var $item = $('<div>').css({
width: self.options.width == 'auto' ? '100%'
: self.options.width - Ox.UI.SCROLLBAR_SIZE + 'px'
: self.options.width - Ox.SCROLLBAR_SIZE + 'px'
}),
$cell = $('<div>').addClass('OxCell').css({width: '8px'}),
$icon = data.id ? getIcon(data.id, data.expanded || (
@ -112,7 +112,7 @@ Ox.TreeList = function(options, self) {
$('<div>')
.addClass('OxCell OxTarget')
.css({
width: self.options.width - padding - 32 - Ox.UI.SCROLLBAR_SIZE + 'px'
width: self.options.width - padding - 32 - Ox.SCROLLBAR_SIZE + 'px'
})
.html(data.title || '')
.appendTo($item);