From ec9d84fc91a70adfdb4767620790ef8ddb0352d5 Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 2 Feb 2011 11:46:17 -0500 Subject: [PATCH] change full calendar default view to month. when changing slot minutes now reinits to view you were last looking at. --- public/js/airtime/schedule/add-show.js | 2 +- public/js/airtime/schedule/full-calendar-functions.js | 1 + public/js/airtime/schedule/schedule.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/js/airtime/schedule/add-show.js b/public/js/airtime/schedule/add-show.js index b80eecb9f..2a86084c1 100644 --- a/public/js/airtime/schedule/add-show.js +++ b/public/js/airtime/schedule/add-show.js @@ -117,7 +117,7 @@ $(document).ready(function() { center: 'title', right: 'agendaDay, agendaWeek, month' }, - defaultView: 'agendaDay', + defaultView: 'month', editable: false, allDaySlot: false, axisFormat: 'H:mm', diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 2b35f670d..09fed4024 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -41,6 +41,7 @@ function viewDisplay( view ) { var opt = view.calendar.options; opt.slotMinutes = parseInt(x); opt.events = getFullCalendarEvents; + opt.defaultView = view.name; $(calendarEl).fullCalendar('destroy'); $(calendarEl).fullCalendar(opt); }); diff --git a/public/js/airtime/schedule/schedule.js b/public/js/airtime/schedule/schedule.js index 1ebf49f0f..84873d8e8 100644 --- a/public/js/airtime/schedule/schedule.js +++ b/public/js/airtime/schedule/schedule.js @@ -199,7 +199,7 @@ $(window).load(function() { center: 'title', right: 'agendaDay, agendaWeek, month' }, - defaultView: 'agendaDay', + defaultView: 'month', editable: false, allDaySlot: false, axisFormat: 'H:mm',