ソースを参照

Rename fc-header and fc-footer classes to fc-header-toolbar and fc-footer-toolbar

Axel Duch 9 年 前
コミット
7ce236d7ec

+ 2 - 2
src/Calendar.js

@@ -608,7 +608,7 @@ function Calendar_constructor(element, overrides) {
 
 
 	function computeHeaderOptions() {
 	function computeHeaderOptions() {
 		return $.extend(
 		return $.extend(
-			{ extraClasses: 'fc-header' },
+			{ extraClasses: 'fc-header-toolbar' },
 			t.options,
 			t.options,
 			{ layout: t.options.header });
 			{ layout: t.options.header });
 	}
 	}
@@ -616,7 +616,7 @@ function Calendar_constructor(element, overrides) {
 
 
 	function computeFooterOptions() {
 	function computeFooterOptions() {
 		return $.extend(
 		return $.extend(
-			{ extraClasses: 'fc-footer' },
+			{ extraClasses: 'fc-footer-toolbar' },
 			t.options,
 			t.options,
 			{ layout: t.options.footer });
 			{ layout: t.options.footer });
 	}
 	}

+ 1 - 1
src/common/DayGrid.limit.js

@@ -277,7 +277,7 @@ DayGrid.mixin({
 		var isTheme = view.opt('theme');
 		var isTheme = view.opt('theme');
 		var title = this.getCellDate(row, col).format(view.opt('dayPopoverFormat'));
 		var title = this.getCellDate(row, col).format(view.opt('dayPopoverFormat'));
 		var content = $(
 		var content = $(
-			'<div class="fc-header ' + view.widgetHeaderClass + '">' +
+			'<div class="fc-header-toolbar ' + view.widgetHeaderClass + '">' +
 				'<span class="fc-close ' +
 				'<span class="fc-close ' +
 					(isTheme ? 'ui-icon ui-icon-closethick' : 'fc-icon fc-icon-x') +
 					(isTheme ? 'ui-icon ui-icon-closethick' : 'fc-icon fc-icon-x') +
 				'"></span>' +
 				'"></span>' +

+ 10 - 10
src/common/common.css

@@ -40,12 +40,12 @@ body .fc { /* extra precedence to overcome jqui */
 }
 }
 
 
 .fc-unthemed .fc-divider,
 .fc-unthemed .fc-divider,
-.fc-unthemed .fc-popover .fc-header,
+.fc-unthemed .fc-popover .fc-header-toolbar,
 .fc-unthemed .fc-list-heading td {
 .fc-unthemed .fc-list-heading td {
 	background: #eee;
 	background: #eee;
 }
 }
 
 
-.fc-unthemed .fc-popover .fc-header .fc-close {
+.fc-unthemed .fc-popover .fc-header-toolbar .fc-close {
 	color: #666;
 	color: #666;
 }
 }
 
 
@@ -282,25 +282,25 @@ previous button's border...
 	box-shadow: 0 2px 6px rgba(0,0,0,.15);
 	box-shadow: 0 2px 6px rgba(0,0,0,.15);
 }
 }
 
 
-.fc-popover .fc-header { /* TODO: be more consistent with fc-head/fc-body */
+.fc-popover .fc-header-toolbar { /* TODO: be more consistent with fc-head/fc-body */
 	padding: 2px 4px;
 	padding: 2px 4px;
 }
 }
 
 
-.fc-popover .fc-header .fc-title {
+.fc-popover .fc-header-toolbar .fc-title {
 	margin: 0 2px;
 	margin: 0 2px;
 }
 }
 
 
-.fc-popover .fc-header .fc-close {
+.fc-popover .fc-header-toolbar .fc-close {
 	cursor: pointer;
 	cursor: pointer;
 }
 }
 
 
-.fc-ltr .fc-popover .fc-header .fc-title,
-.fc-rtl .fc-popover .fc-header .fc-close {
+.fc-ltr .fc-popover .fc-header-toolbar .fc-title,
+.fc-rtl .fc-popover .fc-header-toolbar .fc-close {
 	float: left;
 	float: left;
 }
 }
 
 
-.fc-rtl .fc-popover .fc-header .fc-title,
-.fc-ltr .fc-popover .fc-header .fc-close {
+.fc-rtl .fc-popover .fc-header-toolbar .fc-title,
+.fc-ltr .fc-popover .fc-header-toolbar .fc-close {
 	float: right;
 	float: right;
 }
 }
 
 
@@ -311,7 +311,7 @@ previous button's border...
 	border-style: solid;
 	border-style: solid;
 }
 }
 
 
-.fc-unthemed .fc-popover .fc-header .fc-close {
+.fc-unthemed .fc-popover .fc-header-toolbar .fc-close {
 	font-size: .9em;
 	font-size: .9em;
 	margin-top: 2px;
 	margin-top: 2px;
 }
 }

+ 2 - 2
src/main.css

@@ -6,11 +6,11 @@
 	text-align: center;
 	text-align: center;
 }
 }
 
 
-.fc-toolbar.fc-header {
+.fc-toolbar.fc-header-toolbar {
 	margin-bottom: 1em;
 	margin-bottom: 1em;
 }
 }
 
 
-.fc-toolbar.fc-footer {
+.fc-toolbar.fc-footer-toolbar {
 	margin-top: 1em;
 	margin-top: 1em;
 }
 }
 
 

+ 3 - 3
tests/automated/dayPopoverFormat.js

@@ -25,19 +25,19 @@ describe('dayPopoverFormat', function() {
 	it('can be set to a custom value', function() {
 	it('can be set to a custom value', function() {
 		options.dayPopoverFormat = 'ddd, MMMM';
 		options.dayPopoverFormat = 'ddd, MMMM';
 		init();
 		init();
-		expect($('.fc-more-popover > .fc-header .fc-title')).toHaveText('Tue, July');
+		expect($('.fc-more-popover > .fc-header-toolbar .fc-title')).toHaveText('Tue, July');
 	});
 	});
 
 
 	it('is affected by the current locale when the value is default', function() {
 	it('is affected by the current locale when the value is default', function() {
 		options.locale = 'fr';
 		options.locale = 'fr';
 		init();
 		init();
-		expect($('.fc-more-popover > .fc-header .fc-title')).toHaveText('29 juillet 2014');
+		expect($('.fc-more-popover > .fc-header-toolbar .fc-title')).toHaveText('29 juillet 2014');
 	});
 	});
 
 
 	it('still maintains the same format when explicitly set, and there is a locale', function() {
 	it('still maintains the same format when explicitly set, and there is a locale', function() {
 		options.locale = 'fr';
 		options.locale = 'fr';
 		options.dayPopoverFormat = 'YYYY';
 		options.dayPopoverFormat = 'YYYY';
 		init();
 		init();
-		expect($('.fc-more-popover > .fc-header .fc-title')).toHaveText('2014');
+		expect($('.fc-more-popover > .fc-header-toolbar .fc-title')).toHaveText('2014');
 	});
 	});
 });
 });

+ 2 - 2
tests/automated/eventLimit-popover.js

@@ -189,8 +189,8 @@ describe('eventLimit popover', function() {
 	it('doesn\'t close when user clicks somewhere inside of the popover', function() {
 	it('doesn\'t close when user clicks somewhere inside of the popover', function() {
 		init();
 		init();
 		expect($('.fc-more-popover')).toBeVisible();
 		expect($('.fc-more-popover')).toBeVisible();
-		expect($('.fc-more-popover .fc-header')).toBeInDOM();
-		$('.fc-more-popover .fc-header').simulate('mousedown').simulate('click');
+		expect($('.fc-more-popover .fc-header-toolbar')).toBeInDOM();
+		$('.fc-more-popover .fc-header-toolbar').simulate('mousedown').simulate('click');
 		expect($('.fc-more-popover')).toBeVisible();
 		expect($('.fc-more-popover')).toBeVisible();
 	});
 	});
 
 

+ 5 - 5
tests/automated/footer-navigation.js

@@ -16,7 +16,7 @@ describe('footer navigation', function() {
 	describe('and click next', function() {
 	describe('and click next', function() {
 		it('should change view to next month', function() {
 		it('should change view to next month', function() {
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
-			$('.fc-footer .fc-next-button').simulate('click');
+			$('.fc-footer-toolbar .fc-next-button').simulate('click');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			expect(newDate).toEqualMoment('2010-03-01');
 			expect(newDate).toEqualMoment('2010-03-01');
 		});
 		});
@@ -25,7 +25,7 @@ describe('footer navigation', function() {
 	describe('and click prev', function() {
 	describe('and click prev', function() {
 		it('should change view to prev month', function() {
 		it('should change view to prev month', function() {
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
-			$('.fc-footer .fc-prev-button').simulate('click');
+			$('.fc-footer-toolbar .fc-prev-button').simulate('click');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			expect(newDate).toEqualMoment('2010-01-01');
 			expect(newDate).toEqualMoment('2010-01-01');
 		});
 		});
@@ -34,7 +34,7 @@ describe('footer navigation', function() {
 	describe('and click prevYear', function() {
 	describe('and click prevYear', function() {
 		it('should change view to prev month', function() {
 		it('should change view to prev month', function() {
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
-			$('.fc-footer .fc-prevYear-button').simulate('click');
+			$('.fc-footer-toolbar .fc-prevYear-button').simulate('click');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			expect(newDate).toEqualMoment('2009-02-01');
 			expect(newDate).toEqualMoment('2009-02-01');
 		});
 		});
@@ -43,7 +43,7 @@ describe('footer navigation', function() {
 	describe('and click nextYear', function() {
 	describe('and click nextYear', function() {
 		it('should change view to prev month', function() {
 		it('should change view to prev month', function() {
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
-			$('.fc-footer .fc-nextYear-button').simulate('click');
+			$('.fc-footer-toolbar .fc-nextYear-button').simulate('click');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			var newDate = $('#calendar').fullCalendar('getDate');
 			expect(newDate).toEqualMoment('2011-02-01');
 			expect(newDate).toEqualMoment('2011-02-01');
 		});
 		});
@@ -52,7 +52,7 @@ describe('footer navigation', function() {
 	describe('and click today', function() {
 	describe('and click today', function() {
 		it('should change view to prev month', function() {
 		it('should change view to prev month', function() {
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
 			$('#calendar').fullCalendar('gotoDate', '2010-02-01');
-			$('.fc-footer .fc-today-button').simulate('click');
+			$('.fc-footer-toolbar .fc-today-button').simulate('click');
 			var newDate = $('#calendar').fullCalendar('getDate'); // will be ambig zone
 			var newDate = $('#calendar').fullCalendar('getDate'); // will be ambig zone
 			newDate.local(); // assign the local timezone
 			newDate.local(); // assign the local timezone
 			expect(newDate).toEqualNow();
 			expect(newDate).toEqualNow();

+ 5 - 5
tests/automated/footer-rendering.js

@@ -16,8 +16,8 @@ describe('footer rendering', function() {
 			};
 			};
 			$('#calendar').fullCalendar(options);
 			$('#calendar').fullCalendar(options);
 		});
 		});
-		it('should append a .fc-footer to the DOM', function() {
-			var footer = $('#calendar .fc-footer');
+		it('should append a .fc-footer-toolbar to the DOM', function() {
+			var footer = $('#calendar .fc-footer-toolbar');
 			expect(footer.length).toBe(1);
 			expect(footer.length).toBe(1);
 		});
 		});
 	});
 	});
@@ -30,7 +30,7 @@ describe('footer rendering', function() {
 			$('#calendar').fullCalendar(options);
 			$('#calendar').fullCalendar(options);
 		});
 		});
 		it('should not have footer table', function() {
 		it('should not have footer table', function() {
-			expect($('.fc-footer')).not.toBeInDOM();
+			expect($('.fc-footer-toolbar')).not.toBeInDOM();
 		});
 		});
 	});
 	});
 
 
@@ -43,9 +43,9 @@ describe('footer rendering', function() {
 			}
 			}
 		};
 		};
 		$('#calendar').fullCalendar(options);
 		$('#calendar').fullCalendar(options);
-		expect($('.fc-footer')).toBeInDOM();
+		expect($('.fc-footer-toolbar')).toBeInDOM();
 		$('#calendar').fullCalendar('option', 'footer', false);
 		$('#calendar').fullCalendar('option', 'footer', false);
-		expect($('.fc-footer')).not.toBeInDOM();
+		expect($('.fc-footer-toolbar')).not.toBeInDOM();
 	});
 	});
 
 
 });
 });