less re-rendering of full calendar.

This commit is contained in:
Naomi 2011-02-02 10:50:19 -05:00
parent 75649c8430
commit a1dee48759
2 changed files with 3 additions and 11 deletions

View file

@ -190,7 +190,8 @@ function scheduleRefetchEvents() {
$("#schedule_calendar").fullCalendar( 'refetchEvents' );
}
$(document).ready(function() {
$(window).load(function() {
var mainHeight = document.documentElement.clientHeight - 200 - 50;
$('#schedule_calendar').fullCalendar({
header: {
@ -206,6 +207,7 @@ $(document).ready(function() {
agenda: 'H:mm{ - H:mm}',
month: 'H:mm{ - H:mm}'
},
contentHeight: mainHeight,
events: getFullCalendarEvents,
@ -220,12 +222,6 @@ $(document).ready(function() {
eventDrop: eventDrop,
eventResize: eventResize
});
});
$(window).load(function() {
var mainHeight = document.documentElement.clientHeight - 200 - 50;
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
$('#schedule_calendar').fullCalendar('render');
});