From 752f60bd7626fcb51c0302bfd027b18d34d932b4 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 6 Jul 2011 11:57:42 -0400 Subject: [PATCH] CC-2512:Small browser window causes day/week/month buttons to overlap Calendar - fixed - also margin was adjusted to more reasonable size --- airtime_mvc/public/js/airtime/schedule/add-show.js | 10 ++++++---- .../js/airtime/schedule/full-calendar-functions.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 74576fa16..1df5b1c6a 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -426,10 +426,12 @@ $(document).ready(function() { $(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'); + if(!$("#schedule-add-show").is(':hidden')){ + var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); + var widthPercent = parseInt(calendarWidth)+"%"; + $("#schedule_calendar").css("width", widthPercent); + $("#schedule_calendar").fullCalendar('render'); + } }); $(window).load(function() { 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 720fc2d2e..e0de9e0ac 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -15,7 +15,7 @@ function openAddShowForm() { $("#add-show-form").show(); 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 calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100); var widthPercent = parseInt(calendarWidth)+"%"; $("#schedule_calendar").css("width", widthPercent); $("#schedule_calendar").fullCalendar('render');