From e7b870d3cbfc96d711bdb753003453001d1e8b63 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 25 Apr 2011 11:33:39 +0200 Subject: [PATCH] fixing loader --- demos/calendar/index.html | 2 +- demos/calendar/js/calendar.js | 2 +- source/js/Ox.UI/Form/Ox.Input.js | 2 +- source/js/Ox.UI/Ox.UI.js | 17 +++++------------ 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/demos/calendar/index.html b/demos/calendar/index.html index ec09a699..e6330356 100644 --- a/demos/calendar/index.html +++ b/demos/calendar/index.html @@ -3,7 +3,7 @@ ox.js calendar demo - + diff --git a/demos/calendar/js/calendar.js b/demos/calendar/js/calendar.js index 54024bea..f8ce10e6 100644 --- a/demos/calendar/js/calendar.js +++ b/demos/calendar/js/calendar.js @@ -2,7 +2,7 @@ console.log('calling Ox.UI()') //console.log('Ox =', Ox) //console.log('Ox.UI =', Ox.UI) -Ox.UI({display: 'console', theme: 'modern'}, function() { +Ox.load('UI', {showScreen: true, theme: 'modern'}, function() { console.log('running Ox.UI()') //console.log('Ox =', Ox) diff --git a/source/js/Ox.UI/Form/Ox.Input.js b/source/js/Ox.UI/Form/Ox.Input.js index 1a0a0828..35b5d6a3 100644 --- a/source/js/Ox.UI/Form/Ox.Input.js +++ b/source/js/Ox.UI/Form/Ox.Input.js @@ -211,7 +211,7 @@ Ox.Input = function(options, self) { // probably better: divs in the background if (self.options.type == 'textarea') { $.extend(self, { - colors: Ox.theme() == 'classic' ? + colors: Ox.Theme() == 'classic' ? [208, 232, 244] : //[0, 16, 32], [32, 48, 64], diff --git a/source/js/Ox.UI/Ox.UI.js b/source/js/Ox.UI/Ox.UI.js index 03824fd8..013fe011 100644 --- a/source/js/Ox.UI/Ox.UI.js +++ b/source/js/Ox.UI/Ox.UI.js @@ -43,10 +43,7 @@ Ox.load.UI = function(options, callback) { function showScreen() { - Ox.print('showScreen') - - var body = Ox.element('body') - .addClass('OxTheme' + Ox.toTitleCase(options.theme)), + var body = Ox.element('body'), css = { position: 'absolute', left: 0, @@ -77,8 +74,7 @@ Ox.load.UI = function(options, callback) { browserSupported ? showIcon() : showWarning(); function showIcon() { - // fixme: directory should be 'Ox.UI. ...' - var src = Ox.PATH + 'svg/ox.ui.' + options.theme + '/symbolLoading.svg' + var src = Ox.PATH + 'svg/Ox.UI.' + options.theme + '/symbolLoading.svg' Ox.loadFile(src, function() { Ox.element('') .attr({ @@ -163,7 +159,8 @@ Ox.load.UI = function(options, callback) { Ox.loadFile(Ox.PATH + file, function() { ++counter == files.length && Ox.documentReady(function() { var $div; - if (browserSupported && options.hideScreen) { + Ox.Theme(options.theme); + if (browserSupported && options.showScreen && options.hideScreen) { $div = $('.OxLoadingScreen'); //$div.find('img').remove(); $div.animate({ @@ -221,14 +218,10 @@ Ox.load.UI = function(options, callback) { if (filename == 'symbolPlay.svg') { filename = 'symbolRight.svg'; } - return Ox.UI.PATH + filename.split('.').pop() + + return Ox.PATH + filename.split('.').pop() + '/Ox.UI.' + Ox.Theme() + '/' + filename; }; Ox.UI.IMAGE_CACHE = []; - - Ox.UI.ready = function(callback) { - - } Ox.UI.SCROLLBAR_SIZE = $.browser.mozilla ? 16 : 12; // fixme: the follwing should be deprecated Ox.UI.getBarSize = function(size) {