forked from 0x2620/oxjs
Ox -> Ox.UI
This commit is contained in:
parent
177693b3ce
commit
e2a42ab04e
12 changed files with 47 additions and 47 deletions
|
|
@ -458,8 +458,8 @@
|
|||
Ox.Element.prototype.childrenElements = function childrenElements() {
|
||||
return Ox.compact(
|
||||
Ox.slice(this.children())
|
||||
.filter(Ox.isOxElement)
|
||||
.map(Ox.getOxElement)
|
||||
.filter(Ox.UI.isElement)
|
||||
.map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -498,7 +498,7 @@
|
|||
@*/
|
||||
Ox.Element.prototype.findElements = function findElements() {
|
||||
return Ox.compact(
|
||||
Ox.slice(this.find('.OxElement')).map(Ox.getOxElement)
|
||||
Ox.slice(this.find('.OxElement')).map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -551,7 +551,7 @@
|
|||
@*/
|
||||
Ox.Element.prototype.nextElements = function nextElements() {
|
||||
return Ox.compact(
|
||||
this.nextAll().filter(Ox.isOxElement).map(Ox.getOxElement)
|
||||
this.nextAll().filter(Ox.UI.isElement).map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -588,8 +588,8 @@
|
|||
Ox.Element.prototype.parentElements = function parentElements() {
|
||||
return Ox.compact(
|
||||
Ox.slice(this.parents())
|
||||
.filter(Ox.isOxElement)
|
||||
.map(Ox.getOxElement)
|
||||
.filter(Ox.UI.isElement)
|
||||
.map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -620,7 +620,7 @@
|
|||
@*/
|
||||
Ox.Element.prototype.prevElements = function prevElements() {
|
||||
return Ox.compact(
|
||||
this.prevAll().filter(Ox.isOxElement).map(Ox.getOxElement)
|
||||
this.prevAll().filter(Ox.UI.isElement).map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -698,8 +698,8 @@
|
|||
Ox.Element.prototype.siblingElements = function siblingElements() {
|
||||
return Ox.compact(
|
||||
Ox.slice(this.siblings())
|
||||
.filter(Ox.isOxElement)
|
||||
.map(Ox.getOxElement)
|
||||
.filter(Ox.UI.isElement)
|
||||
.map(Ox.UI.getElement)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
//@ Ox.DIMENSIONS <o> Names of horizontal and vertical dimensions
|
||||
//@ Ox.UI.DIMENSIONS <o> Names of horizontal and vertical dimensions
|
||||
Ox.DIMENSIONS = Ox.UI.DIMENSIONS = {
|
||||
horizontal: ['width', 'height'],
|
||||
vertical: ['height', 'width']
|
||||
};
|
||||
|
||||
//@ Ox.EDGES <o> Names of horizontal and vertical edges
|
||||
//@ Ox.UI.EDGES <o> Names of horizontal and vertical edges
|
||||
Ox.EDGES = Ox.UI.EDGES = {
|
||||
horizontal: ['left', 'right', 'top', 'bottom'],
|
||||
vertical: ['top', 'bottom', 'left', 'right']
|
||||
};
|
||||
|
||||
//@ Ox.SCOLLBAR_SIZE <n> Size of scrollbars
|
||||
//@ Ox.UI.SCROLLBAR_SIZE <n> Size of scrollbars
|
||||
Ox.SCROLLBAR_SIZE = Ox.UI.SCROLLBAR_SIZE = $.browser.webkit ? 8 : (function() {
|
||||
var inner = Ox.$('<p>').css({
|
||||
height: '200px',
|
||||
|
|
@ -35,7 +35,7 @@ Ox.SCROLLBAR_SIZE = Ox.UI.SCROLLBAR_SIZE = $.browser.webkit ? 8 : (function() {
|
|||
return width;
|
||||
})();
|
||||
|
||||
//@ Ox.UI_PATH <str> Path of Ox UI
|
||||
//@ Ox.UI.PATH <str> 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 <f> Returns properties of an Ox UI image
|
||||
Ox.UI.getImageData <f> Returns properties of an Ox UI image
|
||||
(url) -> <s> 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 <f> Returns the URL of an Ox UI image
|
||||
Ox.UI.getImageURL <f> Returns the URL of an Ox UI image
|
||||
(name[, color[, theme]]) -> <s> Image URL
|
||||
name <s> Image name
|
||||
color <s|[n]> Color name or RGB values
|
||||
|
|
@ -119,19 +119,19 @@ Ox.getImageURL = Ox.UI.getImageURL = Ox.cache(function(name, color, theme) {
|
|||
}
|
||||
});
|
||||
|
||||
//@ Ox.getOxElement <f> Returns the Ox.Element of a DOM element, or `undefined`
|
||||
Ox.getOxElement = Ox.UI.getOxElement = function(element) {
|
||||
//@ Ox.UI.getElement <f> 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 <f> Hide and remove Ox UI loading screen
|
||||
Ox.UI.hideScreen <f> 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 <f> Returns `true` if a DOM element is an Ox.Element
|
||||
Ox.isOxElement = Ox.UI.isOxElement = function(element) {
|
||||
//@ Ox.UI.isElement <f> Returns `true` if a DOM element is an Ox.Element
|
||||
Ox.isOxElement = Ox.UI.isElement = Ox.UI.isOxElement = function(element) {
|
||||
return !!$(element).data('oxid');
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue