in isOxElement, test data, not attr; more aliases

This commit is contained in:
rlx 2014-09-23 21:00:21 +02:00
parent 5f69fd35df
commit ab6266f6fc

View file

@ -284,10 +284,10 @@ Ox.load.UI = function(options, callback) {
var callbacks = []; var callbacks = [];
Ox.documentReady(function() { Ox.documentReady(function() {
// FIXME: use Ox.$foo everywhere! // FIXME: use Ox.$foo everywhere!
Ox.$body = Ox.UI.$body = $('body'); Ox.body = Ox.$body = Ox.UI.$body = $('body');
Ox.$document = Ox.UI.$document = $(document); Ox.document = Ox.$document = Ox.UI.$document = $(document);
Ox.$head = Ox.UI.$head = $('head'); Ox.head = Ox.$head = Ox.UI.$head = $('head');
Ox.$window = Ox.UI.$window = $(window); Ox.window = Ox.$window = Ox.UI.$window = $(window);
// fixme: is this the right place to do this? // fixme: is this the right place to do this?
$.browser.mozilla && Ox.$document.on('dragstart', function() { $.browser.mozilla && Ox.$document.on('dragstart', function() {
return false; return false;
@ -374,8 +374,8 @@ Ox.load.UI = function(options, callback) {
} }
}); });
// ... // ...
Ox.getOxElement = Ox.UI.getOxElement = function(element) { Ox.getElement = Ox.getOxElement = Ox.UI.getOxElement = function(element) {
return Ox.$elements[Ox.$(element).data('oxid')]; return Ox.elements[$(element).data('oxid')];
}; };
/*@ /*@
Ox.UI.hideLoadingScreen <f> hide loading screen Ox.UI.hideLoadingScreen <f> hide loading screen
@ -409,7 +409,7 @@ Ox.load.UI = function(options, callback) {
}; };
// ... // ...
Ox.isOxElement = Ox.UI.isOxElement = function(element) { Ox.isOxElement = Ox.UI.isOxElement = function(element) {
return !!Ox.$(element).attr('data-oxid'); return !!$(element).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/';