don't load theme stylesheets, they get imported by ui stylesheet

This commit is contained in:
rolux 2011-04-25 14:24:44 +02:00
parent fd58906e04
commit d4050526c5
4 changed files with 9 additions and 7 deletions

View file

@ -79,7 +79,7 @@ Ox.App = (function() {
}; };
}); });
that.api.init(getUserData(), function(result) { that.api.init(getUserData(), function(result) {
Ox.UI.hideLoadingScreen(); //Ox.UI.hideLoadingScreen();
that.triggerEvent({ that.triggerEvent({
load: result.data load: result.data
}); });

View file

@ -22,6 +22,7 @@ Ox.Theme = function(theme) {
return false; return false;
} }
}); });
Ox.print('getTheme', theme)
return theme; return theme;
} }
@ -35,11 +36,11 @@ Ox.Theme = function(theme) {
var $this = $(this); var $this = $(this);
$this.attr({ $this.attr({
src: $this.attr('src') src: $this.attr('src')
.replace('Ox.UI.' + currentTheme, 'Ox.UI.' + theme) .replace('/Ox.UI.' + currentTheme, '/Ox.UI.' + theme)
}); });
}); });
} }
return currentTheme; return theme;
} }
}; };

View file

@ -43,7 +43,8 @@ Ox.load.UI = function(options, callback) {
function showScreen() { function 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,
@ -170,7 +171,6 @@ Ox.load.UI = function(options, callback) {
.done(function() { .done(function() {
Ox.print('promises done') Ox.print('promises done')
$(function() { $(function() {
Ox.Theme(options.theme);
if (options.showScreen && options.hideScreen) { if (options.showScreen && options.hideScreen) {
Ox.UI.hideLoadingScreen(); Ox.UI.hideLoadingScreen();
} }

View file

@ -57,8 +57,9 @@ for path, dirnames, filenames in os.walk(source_path + 'css/'):
for filename in filenames: for filename in filenames:
source = os.path.join(path, filename) source = os.path.join(path, filename)
target = source.replace(source_path, build_path) target = source.replace(source_path, build_path)
copy_file(source, target) write_link(source, target)
append_file(target.replace(build_path, '')) if filename == 'Ox.UI.css':
append_file(target.replace(build_path, ''))
# js # js
filename = 'js/Ox.js' filename = 'js/Ox.js'