fixing Ox.Theme()

This commit is contained in:
rolux 2011-04-25 13:40:03 +02:00
commit 1d926d203f
3 changed files with 7 additions and 8 deletions

View file

@ -28,7 +28,9 @@ Ox.Theme = function(theme) {
function setTheme(theme) {
var currentTheme = getTheme();
if (theme != currentTheme) {
Ox.UI.$body.addClass('OxTheme' + Ox.toTitleCase(theme));
Ox.UI.$body
.addClass('OxTheme' + Ox.toTitleCase(theme))
.removeClass('OxTheme' + Ox.toTitleCase(currentTheme));
$('img').add('input[type=image]').each(function() {
var $this = $(this);
$this.attr({
@ -37,7 +39,7 @@ Ox.Theme = function(theme) {
});
});
}
return Ox.Theme;
return currentTheme;
}
};