CC-2512:Small browser window causes day/week/month buttons to

overlap Calendar

- fixed
- also margin was adjusted to more reasonable size
This commit is contained in:
james 2011-07-06 11:57:42 -04:00
parent 8f681de498
commit 752f60bd76
2 changed files with 7 additions and 5 deletions

View File

@ -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);
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() {

View File

@ -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');