Avoid error when closing home tab if calendar tab is not loaded

This commit is contained in:
Nathan Gray 2015-11-10 20:04:17 +00:00
parent f3794d510c
commit cbde1b5664

View File

@ -106,9 +106,12 @@ app.classes.calendar = AppJS.extend(
delete window.top.app.calendar;
}
jQuery('body').off('.calendar');
var date = this.sidebox_et2.getWidgetById('date');
$j(window).off('resize.calendar'+date.dom_id);
if(this.sidebox_et2)
{
var date = this.sidebox_et2.getWidgetById('date');
$j(window).off('resize.calendar'+date.dom_id);
}
egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_UP, false, false, false);
egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_DOWN, false, false, false);