diff --git a/jshint.conf.js b/jshint.conf.js index 24e0bc7..50befae 100644 --- a/jshint.conf.js +++ b/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, diff --git a/src/Calendar.js b/src/Calendar.js index b9a7dac..5dd47ee 100644 --- a/src/Calendar.js +++ b/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; diff --git a/src/common/SelectionManager.js b/src/common/SelectionManager.js index ac66bf2..bfe78c4 100644 --- a/src/common/SelectionManager.js +++ b/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) { diff --git a/src/moment-ext.js b/src/moment-ext.js index 110dd5a..85c35f6 100644 --- a/src/moment-ext.js +++ b/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 ]); };