diff --git a/src/EventManager.js b/src/EventManager.js index 500da23..2bdf01d 100644 --- a/src/EventManager.js +++ b/src/EventManager.js @@ -315,10 +315,11 @@ function EventManager(options) { // assumed to be a calendar function removeEvents(filter) { + var i; if (!filter) { // remove all cache = []; // clear all array sources - for (var i=0; i date @@ -563,11 +562,11 @@ function View(element, calendar, viewName) { function dayOffsetToCellOffset(dayOffset) { var day0 = t.start.day(); // first date's day of week dayOffset += day0; // normalize dayOffset to beginning-of-week - return Math.floor(dayOffset / 7) * cellsPerWeek // # of cells from full weeks - + dayToCellMap[ // # of cells from partial last week + return Math.floor(dayOffset / 7) * cellsPerWeek + // # of cells from full weeks + dayToCellMap[ // # of cells from partial last week (dayOffset % 7 + 7) % 7 // crazy math to handle negative dayOffsets - ] - - dayToCellMap[day0]; // adjustment for beginning-of-week normalization + ] - + dayToCellMap[day0]; // adjustment for beginning-of-week normalization } // cell offset -> cell (object with row & col keys) diff --git a/src/date_util.js b/src/date_util.js index e75a77d..b9c566b 100644 --- a/src/date_util.js +++ b/src/date_util.js @@ -216,7 +216,7 @@ moment.fn.format = function() { else { return momentFormatMethod.apply(this, arguments); // pass along all arguments } -} +}; moment.fn.toISOString = function() { if (this._ambigTime) { @@ -254,24 +254,25 @@ $.each([ moment.fn[methodName] = function() { var newThis; + var args = Array.prototype.slice.call(arguments); var i; if (this._ambigZone) { for (i=0; i div').css('min-height', '').css('background', 'red'); var naturalHeight = $('.fc-content').height(); - expect(actualHeight).toEqual(naturalHeight) + expect(actualHeight).toEqual(naturalHeight); }); }); }); diff --git a/tests/automated/header.js b/tests/automated/header.js index b88388a..36bf534 100644 --- a/tests/automated/header.js +++ b/tests/automated/header.js @@ -70,7 +70,7 @@ describe('header testing', function() { header: false }; $('#calendar').fullCalendar(options); - }) + }); it('should not have header table', function() { var headerTableCount = $('table.fc-header').length; expect(headerTableCount).toEqual(0); diff --git a/tests/automated/weekends.js b/tests/automated/weekends.js index 91f9522..a732c3e 100644 --- a/tests/automated/weekends.js +++ b/tests/automated/weekends.js @@ -4,7 +4,7 @@ describe('when weekends option is set', function() { beforeEach(function() { affix('#calendar'); var cal = $('#calendar'); - }) + }); it('should show sat and sun if true', function() { var options = {