2
0
Adam Shaw 9 жил өмнө
parent
commit
c3fab7f9d6

+ 10 - 8
src/EventManager.js

@@ -1240,6 +1240,15 @@ function backupEventDates(event) {
 /* Business Hours
 -----------------------------------------------------------------------------------------*/
 
+var BUSINESS_HOUR_EVENT_DEFAULTS = {
+	id: '_fcBusinessHours', // will relate events from different calls to expandEvent
+	start: '09:00',
+	end: '17:00',
+	dow: [ 1, 2, 3, 4, 5 ], // monday - friday
+	rendering: 'inverse-background'
+	// classNames are defined in businessHoursSegClasses
+};
+
 // Return events objects for business hours within the current view.
 // Abuse of our event system :(
 Calendar.prototype.getCurrentBusinessHourEvents = function(wholeDay) {
@@ -1277,14 +1286,7 @@ Calendar.prototype.expandBusinessHourEvents = function(wholeDay, inputs, ignoreN
 		}
 
 		// give defaults. will make a copy
-		input = $.extend({
-			id: '_fcBusinessHours', // will relate events from different calls to expandEvent
-			start: '09:00',
-			end: '17:00',
-			dow: [ 1, 2, 3, 4, 5 ], // monday - friday
-			rendering: 'inverse-background',
-			className: 'fc-nonbusiness'
-		}, input);
+		input = $.extend({}, BUSINESS_HOUR_EVENT_DEFAULTS, input);
 
 		// if a whole-day series is requested, clear the start/end times
 		if (wholeDay) {

+ 3 - 2
src/common/Grid.events.js

@@ -142,7 +142,7 @@ Grid.mixin({
 
 
 	// Generates an array of classNames to be used for the default rendering of a background event.
-	// Called by the fill system.
+	// Called by fillSegHtml.
 	bgEventSegClasses: function(seg) {
 		var event = seg.event;
 		var source = event.source || {};
@@ -155,7 +155,7 @@ Grid.mixin({
 
 
 	// Generates a semicolon-separated CSS string to be used for the default rendering of a background event.
-	// Called by the fill system.
+	// Called by fillSegHtml.
 	bgEventSegCss: function(seg) {
 		return {
 			'background-color': this.getSegSkinCss(seg)['background-color']
@@ -164,6 +164,7 @@ Grid.mixin({
 
 
 	// Generates an array of classNames to be used for the rendering business hours overlay. Called by the fill system.
+	// Called by fillSegHtml.
 	businessHoursSegClasses: function(seg) {
 		return [ 'fc-nonbusiness', 'fc-bgevent' ];
 	},