fixing Ox.Theme()

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

View file

@ -3,13 +3,10 @@
<head> <head>
<title>ox.js form demo</title> <title>ox.js form demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<link rel="stylesheet" type="text/css" href="css/form.css"/> <link rel="stylesheet" type="text/css" href="css/form.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script> <script type="text/javascript" src="../../source/js/_/ox.data.js"></script>
<script type="text/javascript" src="../../build/js/ox.data.js"></script> <script type="text/javascript" src="../../build/js/Ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.data.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/form.js"></script> <script type="text/javascript" src="js/form.js"></script>
<!--<script> <!--<script>

View file

@ -1,4 +1,4 @@
$(function() { Ox.load('UI', function() {
var $body = $("body"), var $body = $("body"),
$panel = $("<div>") $panel = $("<div>")

View file

@ -28,7 +28,9 @@ Ox.Theme = function(theme) {
function setTheme(theme) { function setTheme(theme) {
var currentTheme = getTheme(); var currentTheme = getTheme();
if (theme != currentTheme) { 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() { $('img').add('input[type=image]').each(function() {
var $this = $(this); var $this = $(this);
$this.attr({ $this.attr({
@ -37,7 +39,7 @@ Ox.Theme = function(theme) {
}); });
}); });
} }
return Ox.Theme; return currentTheme;
} }
}; };