From ce48b78e549e02374f71683353c1d375ac05790c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 24 Feb 2016 18:04:40 +0000 Subject: [PATCH] Fix active calendar tab could not be closed --- calendar/js/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 4789fc1a8e..b25600e46a 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -3294,10 +3294,13 @@ app.classes.calendar = AppJS.extend( } $j(window).on('resize.calendar-owner', function() { var preferred_width = $j('#calendar-et2_target').children().first().outerWidth()||0; - var owner = app.calendar.sidebox_et2.getWidgetById('owner'); - if(preferred_width && owner.input.hasClass("chzn-done")) + if(app.calendar && app.calendar.sidebox_et2) { - 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); + } } }); },