From 775aa607c80a35816b4c329fc93a19c57f0a0d68 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 25 Sep 2014 18:35:17 +0200 Subject: [PATCH] Ox.UI -> Ox --- index.js | 2 +- source/Ox.UI/js/Bar/Bar.js | 2 +- source/Ox.UI/js/Bar/Resizebar.js | 4 ++-- source/Ox.UI/js/Form/Editable.js | 4 ++-- source/Ox.UI/js/Form/Input.js | 6 +++--- source/Ox.UI/js/Form/InsertHTMLDialog.js | 2 +- source/Ox.UI/js/List/CustomList.js | 6 +++--- source/Ox.UI/js/List/IconItem.js | 2 +- source/Ox.UI/js/List/InfoList.js | 4 ++-- source/Ox.UI/js/List/List.js | 4 ++-- source/Ox.UI/js/List/TableList.js | 14 +++++++------- source/Ox.UI/js/List/TreeList.js | 4 ++-- source/Ox.UI/js/Menu/Menu.js | 8 ++++---- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/index.js b/index.js index e932aab9..6b00de2a 100644 --- a/index.js +++ b/index.js @@ -586,7 +586,7 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test( var $item = $('
') .addClass('item') .attr({id: item.id}) - .css({width: 224 - Ox.UI.SCROLLBAR_SIZE + 'px'}) + .css({width: 224 - Ox.SCROLLBAR_SIZE + 'px'}) .appendTo($list); $('
') .addClass('OxSerif title') diff --git a/source/Ox.UI/js/Bar/Bar.js b/source/Ox.UI/js/Bar/Bar.js index 1af93baf..55a23c40 100644 --- a/source/Ox.UI/js/Bar/Bar.js +++ b/source/Ox.UI/js/Bar/Bar.js @@ -18,7 +18,7 @@ Ox.Bar = function(options, self) { .options(options || {}) .addClass('OxBar Ox' + Ox.toTitleCase(self.options.orientation)); - self.dimensions = Ox.UI.DIMENSIONS[self.options.orientation]; + self.dimensions = Ox.DIMENSIONS[self.options.orientation]; that.css(self.dimensions[0], '100%') .css(self.dimensions[1], self.options.size + 'px'); diff --git a/source/Ox.UI/js/Bar/Resizebar.js b/source/Ox.UI/js/Bar/Resizebar.js index 6613b9d0..bda741ac 100644 --- a/source/Ox.UI/js/Bar/Resizebar.js +++ b/source/Ox.UI/js/Bar/Resizebar.js @@ -66,8 +66,8 @@ Ox.Resizebar = function(options, self) { self.clientXY = self.options.orientation == 'horizontal' ? 'clientY' : 'clientX'; - self.dimensions = Ox.UI.DIMENSIONS[self.options.orientation]; - self.edges = Ox.UI.EDGES[self.options.orientation]; + self.dimensions = Ox.DIMENSIONS[self.options.orientation]; + self.edges = Ox.EDGES[self.options.orientation]; self.isLeftOrTop = self.options.edge == 'left' || self.options.edge == 'top'; that.css({cursor: getCursor()}); diff --git a/source/Ox.UI/js/Form/Editable.js b/source/Ox.UI/js/Form/Editable.js index cabfa8af..3bc2b0ee 100644 --- a/source/Ox.UI/js/Form/Editable.js +++ b/source/Ox.UI/js/Form/Editable.js @@ -249,9 +249,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.UI.SCROLLBAR_SIZE to prevent scrollbar from showing up + // +Ox.SCROLLBAR_SIZE to prevent scrollbar from showing up if (self.options.type == 'textarea') { - width += Ox.UI.SCROLLBAR_SIZE; + width += Ox.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/Input.js b/source/Ox.UI/js/Form/Input.js index 4754746d..64e00561 100644 --- a/source/Ox.UI/js/Form/Input.js +++ b/source/Ox.UI/js/Form/Input.js @@ -650,7 +650,7 @@ Ox.Input = function(options, self) { self.options.autovalidate && autovalidate(true); self.options.placeholder && setPlaceholder(); self.options.validate && validate(); - self.bindKeyboard && Ox.UI.$document.off('keydown', keydown); + self.bindKeyboard && Ox.$document.off('keydown', keydown); if (!self.cancelled && !self.submitted) { that.triggerEvent('blur', {value: self.options.value}); self.options.value !== self.originalValue && that.triggerEvent('change', { @@ -782,8 +782,8 @@ Ox.Input = function(options, self) { self.options.placeholder && setPlaceholder(); if (self.bindKeyboard) { // fixme: different in webkit and firefox (?), see keyboard handler, need generic function - Ox.UI.$document.keydown(keydown); - //Ox.UI.$document.keypress(keypress); + Ox.$document.keydown(keydown); + //Ox.$document.keypress(keypress); // temporarily disabled autocomplete on focus //self.options.autocompleteSelect && setTimeout(autocomplete, 0); // fixme: why is the timeout needed? } diff --git a/source/Ox.UI/js/Form/InsertHTMLDialog.js b/source/Ox.UI/js/Form/InsertHTMLDialog.js index c637ec8d..698ba468 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.UI.SCROLLBAR_SIZE + width: 416 + Ox.SCROLLBAR_SIZE }); function renderForm() { diff --git a/source/Ox.UI/js/List/CustomList.js b/source/Ox.UI/js/List/CustomList.js index 93d06324..efed2f2b 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.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, diff --git a/source/Ox.UI/js/List/IconItem.js b/source/Ox.UI/js/List/IconItem.js index 94bc6538..bf6f3cdb 100644 --- a/source/Ox.UI/js/List/IconItem.js +++ b/source/Ox.UI/js/List/IconItem.js @@ -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); diff --git a/source/Ox.UI/js/List/InfoList.js b/source/Ox.UI/js/List/InfoList.js index 4b0e2f61..39a9876b 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 = 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; diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index 18095d09..6684a3f5 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -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 ); } diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index eee9a0db..cb268806 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.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')}); } diff --git a/source/Ox.UI/js/List/TreeList.js b/source/Ox.UI/js/List/TreeList.js index 73f5cda8..c1e2d08e 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.UI.SCROLLBAR_SIZE + 'px' + : self.options.width - Ox.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.UI.SCROLLBAR_SIZE + 'px' + width: self.options.width - padding - 32 - Ox.SCROLLBAR_SIZE + 'px' }) .html(data.title || '') .appendTo($item); diff --git a/source/Ox.UI/js/Menu/Menu.js b/source/Ox.UI/js/Menu/Menu.js index a21dfe50..b78ee2b6 100644 --- a/source/Ox.UI/js/Menu/Menu.js +++ b/source/Ox.UI/js/Menu/Menu.js @@ -788,7 +788,7 @@ Ox.Menu = function(options, self) { if (!that.is(':hidden')) { return; } - that.parent().length == 0 && that.appendTo(Ox.UI.$body); + that.parent().length == 0 && that.appendTo(Ox.$body); that.css({ left: '-1000px', top: '-1000px' @@ -797,13 +797,13 @@ Ox.Menu = function(options, self) { width = self.options.element.outerWidth(), height = self.options.element.outerHeight(), menuWidth = that.width(), - windowWidth = Ox.UI.$window.width(), - windowHeight = Ox.UI.$window.height(), + windowWidth = Ox.$window.width(), + windowHeight = Ox.$window.height(), left = offset.left + self.options.offset.left + (self.options.edge == 'bottom' ? 0 : width), right, top = offset.top + self.options.offset.top + (self.options.edge == 'bottom' ? height : 0), menuHeight = that.$content.outerHeight(), // fixme: why is outerHeight 0 when hidden? - menuMaxHeight = Math.floor(Ox.UI.$window.height() - top - 16); + menuMaxHeight = Math.floor(Ox.$window.height() - top - 16); if (self.options.edge == 'bottom' && left + menuWidth > windowWidth) { left = offset.left + width - menuWidth; that.is('.OxRight') && that.removeClass('OxRight') && that.addClass('OxLeft');