Adam Shaw 12 лет назад
Родитель
Сommit
39dd3f08f4
4 измененных файлов с 8 добавлено и 3 удалено
  1. 4 3
      jshint.conf.js
  2. 1 0
      src/Calendar.js
  3. 1 0
      src/common/SelectionManager.js
  4. 2 0
      src/moment-ext.js

+ 4 - 3
jshint.conf.js

@@ -3,9 +3,10 @@ module.exports = {
 	options: {
 		browser: true,
 		globals: {
-			define: true,
-			moment: true,
-			jQuery: true
+			// `false` means read-only
+			define: false,
+			moment: false,
+			jQuery: false
 		},
 		bitwise: true,
 		camelcase: true,

+ 1 - 0
src/Calendar.js

@@ -709,6 +709,7 @@ function Calendar(element, instanceOptions) {
 	------------------------------------------------------------------------*/
 	
 	if (options.droppable) {
+		// TODO: unbind on destroy
 		$(document)
 			.bind('dragstart', function(ev, ui) {
 				var _e = ev.target;

+ 1 - 0
src/common/SelectionManager.js

@@ -28,6 +28,7 @@ function SelectionManager() {
 
 	// unselectAuto
 	if (opt('selectable') && opt('unselectAuto')) {
+		// TODO: unbind on destroy
 		$(document).mousedown(function(ev) {
 			var ignore = opt('unselectCancel');
 			if (ignore) {

+ 2 - 0
src/moment-ext.js

@@ -52,6 +52,7 @@ function makeMoment(args, parseUTC, parseZone) {
 		isAmbigZone = true;
 	}
 
+	// instantiate a vanilla moment
 	if (parseUTC || parseZone || isAmbigTime) {
 		mom = moment.utc.apply(moment, args);
 	}
@@ -96,6 +97,7 @@ function FCMoment(config) {
 // chain the prototype to Moment's
 FCMoment.prototype = createObject(moment.fn);
 
+// we need this because Moment's implementation will not copy of the ambig flags
 FCMoment.prototype.clone = function() {
 	return makeMoment([ this ]);
 };