use Ox.documentReady; add Ox.UI.getOxElement(element) and Ox.UI.isOxElement(element)
This commit is contained in:
parent
7658c16b7a
commit
1bec2d29ae
1 changed files with 10 additions and 2 deletions
|
@ -261,7 +261,7 @@ Ox.load.UI = function(options, callback) {
|
||||||
Ox.Theme.getThemeData = function(theme) {
|
Ox.Theme.getThemeData = function(theme) {
|
||||||
return themes[theme || Ox.Theme()];
|
return themes[theme || Ox.Theme()];
|
||||||
};
|
};
|
||||||
$(function() {
|
Ox.documentReady(function() {
|
||||||
if (options.showScreen && options.hideScreen) {
|
if (options.showScreen && options.hideScreen) {
|
||||||
Ox.UI.hideLoadingScreen();
|
Ox.UI.hideLoadingScreen();
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ Ox.load.UI = function(options, callback) {
|
||||||
@*/
|
@*/
|
||||||
Ox.UI.ready = (function() {
|
Ox.UI.ready = (function() {
|
||||||
var callbacks = [];
|
var callbacks = [];
|
||||||
$(function() {
|
Ox.documentReady(function() {
|
||||||
// FIXME: use Ox.$foo everywhere!
|
// FIXME: use Ox.$foo everywhere!
|
||||||
Ox.$body = Ox.UI.$body = $('body');
|
Ox.$body = Ox.UI.$body = $('body');
|
||||||
Ox.$document = Ox.UI.$document = $(document);
|
Ox.$document = Ox.UI.$document = $(document);
|
||||||
|
@ -371,6 +371,10 @@ Ox.load.UI = function(options, callback) {
|
||||||
return JSON.stringify(args);
|
return JSON.stringify(args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// ...
|
||||||
|
Ox.UI.getOxElement = function(element) {
|
||||||
|
return Ox.$elements[Ox.$(element).attr('data-oxid')];
|
||||||
|
};
|
||||||
/*@
|
/*@
|
||||||
Ox.UI.hideLoadingScreen <f> hide loading screen
|
Ox.UI.hideLoadingScreen <f> hide loading screen
|
||||||
() -> <u> hide loading screen
|
() -> <u> hide loading screen
|
||||||
|
@ -399,6 +403,10 @@ Ox.load.UI = function(options, callback) {
|
||||||
Ox.UI.isElement = function(object) {
|
Ox.UI.isElement = function(object) {
|
||||||
return Ox.isObject(object) && 'oxid' in object;
|
return Ox.isObject(object) && 'oxid' in object;
|
||||||
};
|
};
|
||||||
|
// ...
|
||||||
|
Ox.UI.isOxElement = function(element) {
|
||||||
|
return !!Ox.$(element).attr('data-oxid');
|
||||||
|
};
|
||||||
//@ Ox.UI.PATH <str> Path of Ox.UI
|
//@ Ox.UI.PATH <str> Path of Ox.UI
|
||||||
Ox.UI.PATH = Ox.PATH + 'Ox.UI/';
|
Ox.UI.PATH = Ox.PATH + 'Ox.UI/';
|
||||||
//@ Ox.UI.SCOLLBAR_SIZE <str> size of scrollbar
|
//@ Ox.UI.SCOLLBAR_SIZE <str> size of scrollbar
|
||||||
|
|
Loading…
Reference in a new issue