From 5c05f6b740eac2b247988a381374843b8a7e25f7 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 4 Jun 2013 22:07:42 -0700 Subject: [PATCH] fixed calendar now showing on load. --- UI/Calendar/CalendarCollectionView.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/UI/Calendar/CalendarCollectionView.js b/UI/Calendar/CalendarCollectionView.js index db35886a2..7c3d80755 100644 --- a/UI/Calendar/CalendarCollectionView.js +++ b/UI/Calendar/CalendarCollectionView.js @@ -10,7 +10,7 @@ define(['app', 'Calendar/CalendarItemView'], function () { calendar: '#calendar' }, - initialize : function () { + initialize : function () { //should use this.collection? this.calendar = new NzbDrone.Calendar.CalendarCollection(); }, @@ -57,7 +57,13 @@ define(['app', 'Calendar/CalendarItemView'], function () { NzbDrone.Calendar.CalendarCollectionView.Instance = this; }, - getEvents : function (start, end, callback) { + + onShow: function () { + this.$('.fc-button-today').click(); + }, + + + getEvents: function (start, end, callback) { var bbView = NzbDrone.Calendar.CalendarCollectionView.Instance; var startDate = Date.create(start).format(Date.ISO8601_DATETIME); @@ -66,7 +72,7 @@ define(['app', 'Calendar/CalendarItemView'], function () { bbView.calendar.fetch({ data : { start: startDate, end: endDate }, success: function (calendarCollection) { - _.each(calendarCollection.models, function(element) { + _.each(calendarCollection.models, function (element) { var episodeTitle = element.get('title'); var seriesTitle = element.get('series').title; var start = element.get('airDate'); @@ -82,4 +88,4 @@ define(['app', 'Calendar/CalendarItemView'], function () { }); } }); -}); \ No newline at end of file +});