CC-3763 : Don't call window.resize callbacks multiple time during continuous events
This commit is contained in:
parent
025822ce35
commit
f78e6eaeca
1 changed files with 7 additions and 2 deletions
|
@ -508,8 +508,7 @@ function alertShowErrorAndReload(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function windowResize() {
|
||||||
$(window).resize(function(){
|
|
||||||
var windowWidth = $(this).width();
|
var windowWidth = $(this).width();
|
||||||
// margin on showform are 16 px on each side
|
// margin on showform are 16 px on each side
|
||||||
if(!$("#schedule-add-show").is(':hidden')){
|
if(!$("#schedule-add-show").is(':hidden')){
|
||||||
|
@ -524,4 +523,10 @@ $(window).resize(function(){
|
||||||
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight)
|
$('#schedule_calendar').fullCalendar('option', 'contentHeight', mainHeight)
|
||||||
$("#schedule_calendar").fullCalendar('render');
|
$("#schedule_calendar").fullCalendar('render');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var scheduleResizeTimeout;
|
||||||
|
$(window).resize(function(){
|
||||||
|
clearTimeout(scheduleResizeTimeout);
|
||||||
|
scheduleResizeTimeout = setTimeout(windowResize, 100);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue