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

@ -107,8 +107,11 @@ app.classes.calendar = AppJS.extend(
} }
jQuery('body').off('.calendar'); jQuery('body').off('.calendar');
var date = this.sidebox_et2.getWidgetById('date'); if(this.sidebox_et2)
$j(window).off('resize.calendar'+date.dom_id); {
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_UP, false, false, false);
egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_DOWN, false, false, false); egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_DOWN, false, false, false);