Fix active calendar tab could not be closed

This commit is contained in:
Nathan Gray 2016-02-24 18:04:40 +00:00
parent a837f8d30c
commit ce48b78e54

View File

@ -3294,10 +3294,13 @@ app.classes.calendar = AppJS.extend(
} }
$j(window).on('resize.calendar-owner', function() { $j(window).on('resize.calendar-owner', function() {
var preferred_width = $j('#calendar-et2_target').children().first().outerWidth()||0; var preferred_width = $j('#calendar-et2_target').children().first().outerWidth()||0;
var owner = app.calendar.sidebox_et2.getWidgetById('owner'); if(app.calendar && app.calendar.sidebox_et2)
if(preferred_width && owner.input.hasClass("chzn-done"))
{ {
owner.input.next().css('width',preferred_width); var owner = app.calendar.sidebox_et2.getWidgetById('owner');
if(preferred_width && owner.input.hasClass("chzn-done"))
{
owner.input.next().css('width',preferred_width);
}
} }
}); });
}, },