From 731f97e0f1bfe8ba09e826b76c5a778b864b707d Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 25 Sep 2014 18:28:13 +0200 Subject: [PATCH] simplify Ox.UI loader --- source/Ox.UI/Ox.UI.js | 397 +++++++++++++----------------------------- 1 file changed, 120 insertions(+), 277 deletions(-) diff --git a/source/Ox.UI/Ox.UI.js b/source/Ox.UI/Ox.UI.js index f65485f4..f7bf48a1 100644 --- a/source/Ox.UI/Ox.UI.js +++ b/source/Ox.UI/Ox.UI.js @@ -49,50 +49,14 @@ Ox.load.UI = function(options, callback) { } ], browserSupported = false, - colors = { - marker: { - '#000000': 'videoMarkerBorder', - '#FFFFFF': 'videoMarkerBackground' - }, - symbol: { - '#FF0000': 'symbolWarningColor' - } - }, - images = {}, - isInternetExplorer = /MSIE/.test(navigator.userAgent), - loadingInterval, - themes = {}; + isInternetExplorer = /MSIE/.test(navigator.userAgent); - browsers.forEach(function(browser) { - var match = browser.regexp && browser.regexp.exec(navigator.userAgent); - if (match && match[1] >= browser.version) { - browserSupported = true; - } - }); + Ox.UI = {}; // FIXME: remove - Ox.documentReady(function() { - Ox.$('body').addClass( - 'OxTheme' + Ox.toTitleCase(options.theme || 'oxlight') - ); - options.showScreen && showScreen(); - }); + Ox.LoadingScreen = (function() { - loadFiles(); - - function showScreen() { - - var body = Ox.$('body'), - css = { - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - margin: 'auto', - MozUserSelect: 'none', - WebkitUserSelect: 'none' - }, - div = Ox.$('
').css({ - height: '200px', - width: '100%' - }), - outer = Ox.$('