Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2012-05-04 12:40:52 -04:00
commit c85c44dbb4
2 changed files with 11 additions and 3 deletions

View File

@ -13,6 +13,7 @@ var AIRTIME = (function(AIRTIME){
$lib, $lib,
$pl, $pl,
widgetHeight, widgetHeight,
resizeTimeout,
width; width;
function isTimeValid(time) { function isTimeValid(time) {
@ -779,7 +780,9 @@ var AIRTIME = (function(AIRTIME){
}; };
mod.onResize = function() { mod.onResize = function() {
setWidgetSize();
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(setWidgetSize, 100);
}; };
return AIRTIME; return AIRTIME;

View File

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