Ver Fonte

rename to themeSystem

Adam Shaw há 8 anos atrás
pai
commit
1c84e69773

+ 2 - 2
demos/themes.html

@@ -16,7 +16,7 @@
 
 			init: function(themeSystem) {
 				$('#calendar').fullCalendar({
-					theme: themeSystem,
+					themeSystem: themeSystem,
 					header: {
 						left: 'prev,next today',
 						center: 'title',
@@ -87,7 +87,7 @@
 			},
 
 			change: function(themeSystem) {
-				$('#calendar').fullCalendar('option', 'theme', themeSystem);
+				$('#calendar').fullCalendar('option', 'themeSystem', themeSystem);
 			}
 
 		});

+ 2 - 2
src/Calendar.render.js

@@ -48,8 +48,8 @@ Calendar.mixin({
 		});
 
 		// called immediately, and upon option change
-		this.optionsModel.watch('settingTheme', [ '?theme' ], function(opts) {
-			var themeClass = ThemeRegistry.getThemeClass(opts.theme);
+		this.optionsModel.watch('settingTheme', [ '?theme', '?themeSystem' ], function(opts) {
+			var themeClass = ThemeRegistry.getThemeClass(opts.themeSystem || opts.theme);
 			var theme = new themeClass(_this.optionsModel);
 			var widgetClass = theme.getClass('widget');
 

+ 1 - 1
tests/theme/bootstrap3.js

@@ -1,6 +1,6 @@
 
 describe('bootstrap3 theme', function() {
-	pushOptions({ theme: 'bootstrap3' });
+	pushOptions({ themeSystem: 'bootstrap3' });
 
 	describe('glyphicons', function() {
 		pushOptions({

+ 3 - 3
tests/theme/switching.js

@@ -4,14 +4,14 @@ describe('theme switching', function() {
 	it('can switch from standard to jquery-ui', function() {
 		initCalendar();
 		verifyStandardTheme();
-		currentCalendar.option('theme', 'jquery-ui');
+		currentCalendar.option('themeSystem', 'jquery-ui');
 		verifyJqueryUiTheme();
 	});
 
 	it('can switch from jquery-ui to boostrap3', function() {
-		initCalendar({ theme: 'jquery-ui' });
+		initCalendar({ themeSystem: 'jquery-ui' });
 		verifyJqueryUiTheme();
-		currentCalendar.option('theme', 'bootstrap3');
+		currentCalendar.option('themeSystem', 'bootstrap3');
 		verifyBootstrapTheme();
 	});
 

+ 2 - 2
tests/toolbar/customButtons.js

@@ -25,7 +25,7 @@ describe('customButtons', function() {
 
 	it('can specify a jquery-ui icon', function() {
 		initCalendar({
-			theme: 'jquery-ui',
+			themeSystem: 'jquery-ui',
 			customButtons: {
 				mybutton: { themeIcon: 'asdf' }
 			},
@@ -37,7 +37,7 @@ describe('customButtons', function() {
 
 	it('can specify a bootstrap glyphicon', function() {
 		initCalendar({
-			theme: 'bootstrap3',
+			themeSystem: 'bootstrap3',
 			customButtons: {
 				mybutton: { bootstrapGlyphicon: 'asdf' }
 			},