From 4cf5a46c67e9e20d96b400c05bc37a290fa01da3 Mon Sep 17 00:00:00 2001 From: Naomi Date: Fri, 11 Feb 2011 12:45:00 -0500 Subject: [PATCH] will go back to date you were looking at when changing time resolution. --- public/js/airtime/schedule/full-calendar-functions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 60d85e927..4c6ec4ded 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -118,11 +118,13 @@ function viewDisplay( view ) { .change(function(){ var x = $(this).val(); var opt = view.calendar.options; + var d = $(calendarEl).fullCalendar('getDate'); opt.slotMinutes = parseInt(x); opt.events = getFullCalendarEvents; opt.defaultView = view.name; $(calendarEl).fullCalendar('destroy'); $(calendarEl).fullCalendar(opt); + $(calendarEl).fullCalendar( 'gotoDate', d ) }); var x = $(view.element).find(".fc-agenda-head th:first"); @@ -132,7 +134,6 @@ function viewDisplay( view ) { var slotMin = view.calendar.options.slotMinutes; $('.schedule_change_slots option[value="'+slotMin+'"]').attr('selected', 'selected'); - } if(($("#add-show-form").length == 1) && ($("#add-show-form").css('display')=='none') && ($('.fc-header-left tbody td').length == 5)) {