Size of scrollbars
Ox.SCROLLBAR_SIZE = Ox.UI.SCROLLBAR_SIZE = $.browser.webkit ? 8 : (function() {
var inner = Ox.$('').css({
height: '200px',
@@ -35,7 +35,7 @@ Ox.SCROLLBAR_SIZE = Ox.UI.SCROLLBAR_SIZE = $.browser.webkit ? 8 : (function() {
return width;
})();
-//@ Ox.UI_PATH Path of Ox UI
+//@ Ox.UI.PATH Path of Ox UI
Ox.UI_PATH = Ox.UI.PATH = Ox.PATH + 'Ox.UI/';
Ox.documentReady(function() {
@@ -54,7 +54,7 @@ Ox.documentReady(function() {
Ox.$elements = Ox.UI.elements = {};
/*@
-Ox.getImageData Returns properties of an Ox UI image
+Ox.UI.getImageData Returns properties of an Ox UI image
(url) -> Image Name
@*/
Ox.getImageData = Ox.UI.getImageData = Ox.cache(function(url) {
@@ -65,7 +65,7 @@ Ox.getImageData = Ox.UI.getImageData = Ox.cache(function(url) {
});
/*@
-Ox.getImageURL Returns the URL of an Ox UI image
+Ox.UI.getImageURL Returns the URL of an Ox UI image
(name[, color[, theme]]) -> Image URL
name Image name
color Color name or RGB values
@@ -119,19 +119,19 @@ Ox.getImageURL = Ox.UI.getImageURL = Ox.cache(function(name, color, theme) {
}
});
-//@ Ox.getOxElement Returns the Ox.Element of a DOM element, or `undefined`
-Ox.getOxElement = Ox.UI.getOxElement = function(element) {
+//@ Ox.UI.getElement Returns the Ox.Element of a DOM element, or `undefined`
+Ox.getOxElement = Ox.UI.getElement = Ox.UI.getOxElement = function(element) {
return Ox.$elements[$(element).data('oxid')];
};
/*@
-Ox.hideScreen Hide and remove Ox UI loading screen
+Ox.UI.hideScreen Hide and remove Ox UI loading screen
@*/
-Ox.hideScreen = Ox.UI.hideLoadingScreen = function() {
- Ox.UILoadingScreen.hide();
+Ox.hideScreen = Ox.UI.hideScreen = Ox.UI.hideLoadingScreen = function() {
+ Ox.UI.LoadingScreen.hide();
};
-//@ Ox.isOxElement Returns `true` if a DOM element is an Ox.Element
-Ox.isOxElement = Ox.UI.isOxElement = function(element) {
+//@ Ox.UI.isElement Returns `true` if a DOM element is an Ox.Element
+Ox.isOxElement = Ox.UI.isElement = Ox.UI.isOxElement = function(element) {
return !!$(element).data('oxid');
};
diff --git a/source/Ox.UI/js/Form/Editable.js b/source/Ox.UI/js/Form/Editable.js
index 71edaac7..019e40aa 100644
--- a/source/Ox.UI/js/Form/Editable.js
+++ b/source/Ox.UI/js/Form/Editable.js
@@ -252,9 +252,9 @@ Ox.Editable = function(options, self) {
self.$test.css({display: 'inline-block'});
height = self.options.height || Ox.limit(self.$test.height(), self.minHeight, self.maxHeight);
width = self.$test.width();
- // +Ox.SCROLLBAR_SIZE to prevent scrollbar from showing up
+ // +Ox.UI.SCROLLBAR_SIZE to prevent scrollbar from showing up
if (self.options.type == 'textarea') {
- width += Ox.SCROLLBAR_SIZE;
+ width += Ox.UI.SCROLLBAR_SIZE;
}
width = self.options.width || Ox.limit(width, self.minWidth, self.maxWidth);
self.$test.css({display: 'none'});
diff --git a/source/Ox.UI/js/Form/InsertHTMLDialog.js b/source/Ox.UI/js/Form/InsertHTMLDialog.js
index 698ba468..c637ec8d 100644
--- a/source/Ox.UI/js/Form/InsertHTMLDialog.js
+++ b/source/Ox.UI/js/Form/InsertHTMLDialog.js
@@ -202,7 +202,7 @@ Ox.InsertHTMLDialog = function(options, self) {
height: 184,
keys: {enter: 'insert', escape: 'cancel'},
title: Ox._('Insert HTML'),
- width: 416 + Ox.SCROLLBAR_SIZE
+ width: 416 + Ox.UI.SCROLLBAR_SIZE
});
function renderForm() {
diff --git a/source/Ox.UI/js/List/CustomList.js b/source/Ox.UI/js/List/CustomList.js
index efed2f2b..93d06324 100644
--- a/source/Ox.UI/js/List/CustomList.js
+++ b/source/Ox.UI/js/List/CustomList.js
@@ -34,7 +34,7 @@ Ox.CustomList = function(options, self) {
self.$list.options({items: self.options.items});
},
itemWidth: function() {
- var width = self.options.itemWidth - Ox.SCROLLBAR_SIZE;
+ var width = self.options.itemWidth - Ox.UI.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.SCROLLBAR_SIZE
+ data, self.options.itemWidth - Ox.UI.SCROLLBAR_SIZE
).addClass('OxTarget');
},
draggable: self.options.draggable,
itemHeight: self.options.itemHeight,
itemWidth: self.options.itemWidth
- - self.options.scrollbarVisible * Ox.SCROLLBAR_SIZE,
+ - self.options.scrollbarVisible * Ox.UI.SCROLLBAR_SIZE,
items: self.options.items,
keys: self.options.keys.concat(self.options.unique),
max: self.options.max,
diff --git a/source/Ox.UI/js/List/InfoList.js b/source/Ox.UI/js/List/InfoList.js
index 33ff242f..b3f5bf27 100644
--- a/source/Ox.UI/js/List/InfoList.js
+++ b/source/Ox.UI/js/List/InfoList.js
@@ -167,9 +167,9 @@ Ox.InfoList = function(options, self) {
function getItemWidth(cached) {
if (!cached) {
- self.cachedWidth = that.width() - Ox.SCROLLBAR_SIZE;
+ self.cachedWidth = that.width() - Ox.UI.SCROLLBAR_SIZE;
} else if (!self.cachedWidth || self.cachedWidthTime < +new Date() - 5000) {
- self.cachedWidth = that.width() - Ox.SCROLLBAR_SIZE;
+ self.cachedWidth = that.width() - Ox.UI.SCROLLBAR_SIZE;
self.cachedWidthTime = +new Date();
}
return self.cachedWidth;
diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js
index 6ff9c777..b5421c02 100644
--- a/source/Ox.UI/js/List/List.js
+++ b/source/Ox.UI/js/List/List.js
@@ -493,7 +493,7 @@ Ox.List = function(options, self) {
if (self.$pages[0]) {
if (self.options.type == 'text') {
self.$pages[0].find('.OxEmpty').each(function() {
- Ox.getOxElement($(this)).remove();
+ Ox.UI.getElement($(this)).remove();
});
} else if (self.options.orientation == 'both') {
that.$content.css({height: getListSize() + 'px'});
@@ -594,7 +594,7 @@ Ox.List = function(options, self) {
return that.height() - (
!self.options.disableHorizontalScrolling
&& that.$content.width() > that.width()
- ? Ox.SCROLLBAR_SIZE : 0
+ ? Ox.UI.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.SCROLLBAR_SIZE : 0
+ that.$content.height() > that.height() ? Ox.UI.SCROLLBAR_SIZE : 0
);
}
diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js
index cb268806..e5d3f0af 100644
--- a/source/Ox.UI/js/List/TableList.js
+++ b/source/Ox.UI/js/List/TableList.js
@@ -206,7 +206,7 @@ Ox.TableList = function(options, self) {
.addClass('OxHead')
.css({
right: self.options.scrollbarVisible
- ? Ox.SCROLLBAR_SIZE + 'px' : 0
+ ? Ox.UI.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.SCROLLBAR_SIZE == 16 ? {
+ .css(Ox.UI.SCROLLBAR_SIZE == 16 ? {
right: 0,
width: '14px'
} : {
@@ -241,7 +241,7 @@ Ox.TableList = function(options, self) {
})
.bindEvent('change', changeColumns)
.appendTo(that.$bar);
- Ox.SCROLLBAR_SIZE < 16 && $(that.$select.find('input')[0]).css({
+ Ox.UI.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.SCROLLBAR_SIZE == 16 ? {
+ .css(Ox.UI.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.SCROLLBAR_SIZE : 0)
+ (self.options.scrollbarVisible ? Ox.UI.SCROLLBAR_SIZE : 0)
);
}
diff --git a/source/Ox.UI/js/List/TreeList.js b/source/Ox.UI/js/List/TreeList.js
index c1e2d08e..73f5cda8 100644
--- a/source/Ox.UI/js/List/TreeList.js
+++ b/source/Ox.UI/js/List/TreeList.js
@@ -94,7 +94,7 @@ Ox.TreeList = function(options, self) {
function constructItem(data) {
var $item = $('').css({
width: self.options.width == 'auto' ? '100%'
- : self.options.width - Ox.SCROLLBAR_SIZE + 'px'
+ : self.options.width - Ox.UI.SCROLLBAR_SIZE + 'px'
}),
$cell = $('
').addClass('OxCell').css({width: '8px'}),
$icon = data.id ? getIcon(data.id, data.expanded || (
@@ -112,7 +112,7 @@ Ox.TreeList = function(options, self) {
$('
')
.addClass('OxCell OxTarget')
.css({
- width: self.options.width - padding - 32 - Ox.SCROLLBAR_SIZE + 'px'
+ width: self.options.width - padding - 32 - Ox.UI.SCROLLBAR_SIZE + 'px'
})
.html(data.title || '')
.appendTo($item);