diff --git a/airtime_mvc/public/css/add-show.css b/airtime_mvc/public/css/add-show.css index cb88f34df..e5df20b6d 100644 --- a/airtime_mvc/public/css/add-show.css +++ b/airtime_mvc/public/css/add-show.css @@ -5,8 +5,8 @@ #schedule-add-show { font-size: 12px; - width: 25%; - min-width:340px; + /*width: 25%;*/ + width:310px; } #schedule-add-show textarea { diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 8eeb2f535..53434de66 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -1522,10 +1522,10 @@ div.success{ margin-right:6px; } .formrow-repeat li .hasDatepicker, .formrow-repeat li .input_select { - width:160px; + width:95px; } .formrow-repeat li .hasTimepicker { - width:80px; + width:60px; } .recording-show { float: right; diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 3fd259f8b..74576fa16 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -423,6 +423,15 @@ $(document).ready(function() { //setAddShowEvents(); }); +$(window).resize(function(){ + var windowWidth = $(this).width(); + // margin on showform are 16 px on each side + var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 6))/windowWidth*100); + var widthPercent = parseInt(calendarWidth)+"%"; + $("#schedule_calendar").css("width", widthPercent); + $("#schedule_calendar").fullCalendar('render'); +}); + $(window).load(function() { setAddShowEvents(); 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 f2bb5f345..720fc2d2e 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -13,7 +13,11 @@ function openAddShowForm() { if($("#add-show-form").length == 1) { if( ($("#add-show-form").css('display')=='none')) { $("#add-show-form").show(); - $("#schedule_calendar").css("width", "70%"); + var windowWidth = $(window).width(); + // margin on showform are 16 px on each side + var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 6))/windowWidth*100); + var widthPercent = parseInt(calendarWidth)+"%"; + $("#schedule_calendar").css("width", widthPercent); $("#schedule_calendar").fullCalendar('render'); } $("#schedule-show-what").show(0, function(){