Преглед изворни кода

misc comments and linter corrections

Adam Shaw пре 11 година
родитељ
комит
1c04616780

+ 1 - 1
build/jshint.conf.js

@@ -19,7 +19,7 @@ module.exports = {
 		trailing: true,
 		eqnull: true,
 		'-W032': true, // Unnecessary semicolon. (lumbar's ;;)
-		'-W008': true // A leading decimal point can be confused with a dot (ex: .5)
+		'-W008': true // A leading decimal point can be confused with a dot (ex: .5) // TODO: think about enabling!
 	},
 
 	srcModules: [

+ 1 - 0
src/Calendar.js

@@ -787,6 +787,7 @@ function Calendar_constructor(element, overrides) {
 
 	/* Height "Freezing"
 	-----------------------------------------------------------------------------*/
+	// TODO: move this into the view
 
 
 	function freezeContentHeight() {

+ 1 - 1
src/agenda/AgendaView.js

@@ -11,7 +11,7 @@ var AGENDA_DEFAULTS = {
 	slotDuration: '00:30:00',
 	minTime: '00:00:00',
 	maxTime: '24:00:00',
-	slotEventOverlap: true
+	slotEventOverlap: true // a bad name. confused with overlap/constraint system
 };
 
 var AGENDA_ALL_DAY_EVENT_LIMIT = 5;

+ 2 - 0
src/common/DayGrid.events.js

@@ -148,6 +148,7 @@ DayGrid.mixin({
 
 	// Given a row # and an array of segments all in the same row, render a <tbody> element, a skeleton that contains
 	// the segments. Returns object with a bunch of internal data about how the render was calculated.
+	// NOTE: modifies rowSegs
 	renderSegRow: function(row, rowSegs) {
 		var colCnt = this.colCnt;
 		var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels
@@ -236,6 +237,7 @@ DayGrid.mixin({
 
 
 	// Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.
+	// NOTE: modifies segs
 	buildSegLevels: function(segs) {
 		var levels = [];
 		var i, seg;

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

@@ -149,6 +149,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.
 	// TODO: consolidate with getEventSkinCss?
+	// TODO: rename to be consistent
 	bgEventSegStyles: function(seg) {
 		var view = this.view;
 		var event = seg.event;
@@ -742,7 +743,7 @@ Grid.mixin({
 				sourceColor ||
 				view.opt('eventBorderColor') ||
 				optionColor,
-			'color':
+			color:
 				event.textColor ||
 				source.textColor ||
 				view.opt('eventTextColor')

+ 1 - 1
src/common/TimeGrid.events.js

@@ -238,7 +238,7 @@ TimeGrid.mixin({
 
 
 // Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.
-// Also reorders the given array by date!
+// NOTE: Also reorders the given array by date!
 function placeSlotSegs(segs) {
 	var levels;
 	var level0;

+ 1 - 1
src/common/View.js

@@ -517,7 +517,7 @@ var View = fc.View = Class.extend({
 
 
 	// Renders the events onto the view.
-	renderEvents: function() {
+	renderEvents: function(events) {
 		// subclasses should implement
 	},
 

+ 1 - 1
src/common/common.css

@@ -279,7 +279,7 @@ previous button's border...
 	box-shadow: 0 2px 6px rgba(0,0,0,.15);
 }
 
-.fc-popover .fc-header {
+.fc-popover .fc-header { /* TODO: be more consistent with fc-head/fc-body */
 	padding: 2px 4px;
 }
 

+ 1 - 0
src/moment-ext.js

@@ -440,6 +440,7 @@ function commonlyAmbiguate(inputs, preserveTime) {
 }
 
 // Transfers all the flags related to ambiguous time/zone from the `src` moment to the `dest` moment
+// TODO: look into moment.momentProperties for this.
 function transferAmbigs(src, dest) {
 	if (src._ambigTime) {
 		dest._ambigTime = true;