fixing loader

This commit is contained in:
rolux 2011-04-25 11:33:39 +02:00
parent 6cfb6b7647
commit e7b870d3cb
4 changed files with 8 additions and 15 deletions

View file

@ -3,7 +3,7 @@
<head> <head>
<title>ox.js calendar demo</title> <title>ox.js calendar demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../build/js/OxUI.js"></script> <script type="text/javascript" src="../../build/js/Ox.js"></script>
<script type="text/javascript" src="js/calendar.js"></script> <script type="text/javascript" src="js/calendar.js"></script>
</head> </head>
<body></body> <body></body>

View file

@ -2,7 +2,7 @@ console.log('calling Ox.UI()')
//console.log('Ox =', Ox) //console.log('Ox =', Ox)
//console.log('Ox.UI =', Ox.UI) //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('running Ox.UI()')
//console.log('Ox =', Ox) //console.log('Ox =', Ox)

View file

@ -211,7 +211,7 @@ Ox.Input = function(options, self) {
// probably better: divs in the background // probably better: divs in the background
if (self.options.type == 'textarea') { if (self.options.type == 'textarea') {
$.extend(self, { $.extend(self, {
colors: Ox.theme() == 'classic' ? colors: Ox.Theme() == 'classic' ?
[208, 232, 244] : [208, 232, 244] :
//[0, 16, 32], //[0, 16, 32],
[32, 48, 64], [32, 48, 64],

View file

@ -43,10 +43,7 @@ Ox.load.UI = function(options, callback) {
function showScreen() { function showScreen() {
Ox.print('showScreen') var body = Ox.element('body'),
var body = Ox.element('body')
.addClass('OxTheme' + Ox.toTitleCase(options.theme)),
css = { css = {
position: 'absolute', position: 'absolute',
left: 0, left: 0,
@ -77,8 +74,7 @@ Ox.load.UI = function(options, callback) {
browserSupported ? showIcon() : showWarning(); browserSupported ? showIcon() : showWarning();
function showIcon() { 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.loadFile(src, function() {
Ox.element('<img>') Ox.element('<img>')
.attr({ .attr({
@ -163,7 +159,8 @@ Ox.load.UI = function(options, callback) {
Ox.loadFile(Ox.PATH + file, function() { Ox.loadFile(Ox.PATH + file, function() {
++counter == files.length && Ox.documentReady(function() { ++counter == files.length && Ox.documentReady(function() {
var $div; var $div;
if (browserSupported && options.hideScreen) { Ox.Theme(options.theme);
if (browserSupported && options.showScreen && options.hideScreen) {
$div = $('.OxLoadingScreen'); $div = $('.OxLoadingScreen');
//$div.find('img').remove(); //$div.find('img').remove();
$div.animate({ $div.animate({
@ -221,14 +218,10 @@ Ox.load.UI = function(options, callback) {
if (filename == 'symbolPlay.svg') { if (filename == 'symbolPlay.svg') {
filename = 'symbolRight.svg'; filename = 'symbolRight.svg';
} }
return Ox.UI.PATH + filename.split('.').pop() + return Ox.PATH + filename.split('.').pop() +
'/Ox.UI.' + Ox.Theme() + '/' + filename; '/Ox.UI.' + Ox.Theme() + '/' + filename;
}; };
Ox.UI.IMAGE_CACHE = []; Ox.UI.IMAGE_CACHE = [];
Ox.UI.ready = function(callback) {
}
Ox.UI.SCROLLBAR_SIZE = $.browser.mozilla ? 16 : 12; Ox.UI.SCROLLBAR_SIZE = $.browser.mozilla ? 16 : 12;
// fixme: the follwing should be deprecated // fixme: the follwing should be deprecated
Ox.UI.getBarSize = function(size) { Ox.UI.getBarSize = function(size) {