diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 4f33ccdc7..a1f053699 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -406,10 +406,9 @@ function setAddShowEvents() { event.stopPropagation(); event.preventDefault(); - $("#schedule_calendar").removeAttr("style") - .fullCalendar('render'); - $("#add-show-form").hide(); + windowResize(); + $.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){ $("#add-show-form") .empty() @@ -652,13 +651,14 @@ function windowResize() { var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); var widthPercent = parseInt(calendarWidth)+"%"; $("#schedule_calendar").css("width", widthPercent); + } else { + $("#schedule_calendar").css("width", 98.5+"%"); } // 200 px for top dashboard and 50 for padding on main content // this calculation was copied from schedule.js line 326 var mainHeight = document.documentElement.clientHeight - 200 - 50; - $('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight) - $("#schedule_calendar").fullCalendar('render'); + $('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight); } diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js index 192d811fe..8f0a6cb0d 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -28,7 +28,11 @@ function openAddShowForm() { var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); var widthPercent = parseInt(calendarWidth)+"%"; $("#schedule_calendar").css("width", widthPercent); - $("#schedule_calendar").fullCalendar('render'); + + // 200 px for top dashboard and 50 for padding on main content + // this calculation was copied from schedule.js line 326 + var mainHeight = document.documentElement.clientHeight - 200 - 50; + $('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight); } $("#schedule-show-what").show(0, function(){ $add_show_name = $("#add_show_name");