diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 09fed4024..2a7e58446 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -25,36 +25,33 @@ function viewDisplay( view ) { if(view.name === 'agendaDay' || view.name === 'agendaWeek') { - var select = $('.schedule_change_slots'); + $('.schedule_change_slots').remove(); var calendarEl = this; - if(select.length === 0) { + var select = $('') + .append('') + .append('') + .append('') + .append('') + .append('') + .change(function(){ + var x = $(this).val(); + var opt = view.calendar.options; + opt.slotMinutes = parseInt(x); + opt.events = getFullCalendarEvents; + opt.defaultView = view.name; + $(calendarEl).fullCalendar('destroy'); + $(calendarEl).fullCalendar(opt); + }); - select = $('') - .append('') - .append('') - .append('') - .append('') - .append('') - .change(function(){ - var x = $(this).val(); - var opt = view.calendar.options; - opt.slotMinutes = parseInt(x); - opt.events = getFullCalendarEvents; - opt.defaultView = view.name; - $(calendarEl).fullCalendar('destroy'); - $(calendarEl).fullCalendar(opt); - }); + $('.fc-header-left tbody tr:first') + .append('