Stopped refetching calendar events when calendar is resized
This commit is contained in:
parent
30c47df93d
commit
1b5b7ae1f7
|
@ -406,10 +406,9 @@ function setAddShowEvents() {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$("#schedule_calendar").removeAttr("style")
|
|
||||||
.fullCalendar('render');
|
|
||||||
|
|
||||||
$("#add-show-form").hide();
|
$("#add-show-form").hide();
|
||||||
|
windowResize();
|
||||||
|
|
||||||
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
|
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json){
|
||||||
$("#add-show-form")
|
$("#add-show-form")
|
||||||
.empty()
|
.empty()
|
||||||
|
@ -652,13 +651,14 @@ function windowResize() {
|
||||||
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
||||||
var widthPercent = parseInt(calendarWidth)+"%";
|
var widthPercent = parseInt(calendarWidth)+"%";
|
||||||
$("#schedule_calendar").css("width", widthPercent);
|
$("#schedule_calendar").css("width", widthPercent);
|
||||||
|
} else {
|
||||||
|
$("#schedule_calendar").css("width", 98.5+"%");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 200 px for top dashboard and 50 for padding on main content
|
// 200 px for top dashboard and 50 for padding on main content
|
||||||
// this calculation was copied from schedule.js line 326
|
// this calculation was copied from schedule.js line 326
|
||||||
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
||||||
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight)
|
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight);
|
||||||
$("#schedule_calendar").fullCalendar('render');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,11 @@ function openAddShowForm() {
|
||||||
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
var calendarWidth = 100-(($("#schedule-add-show").width() + (16 * 4))/windowWidth*100);
|
||||||
var widthPercent = parseInt(calendarWidth)+"%";
|
var widthPercent = parseInt(calendarWidth)+"%";
|
||||||
$("#schedule_calendar").css("width", widthPercent);
|
$("#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(){
|
$("#schedule-show-what").show(0, function(){
|
||||||
$add_show_name = $("#add_show_name");
|
$add_show_name = $("#add_show_name");
|
||||||
|
|
Loading…
Reference in New Issue