Do not update infolog changes if calendar is not showing infolog entries

This commit is contained in:
Nathan Gray 2016-01-11 20:43:52 +00:00
parent bdacc3573a
commit bad0262c4e

View File

@ -237,6 +237,11 @@ app.classes.calendar = AppJS.extend(
if (match[1]== _id) do_refresh = true; if (match[1]== _id) do_refresh = true;
} }
}); });
// Unfortunately we do not know what type this infolog is here,
// but we can tell if it's turned off entirely
if(egw.preference('calendar_integration','infolog') !== '0')
{
if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true; if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true;
switch (_type) switch (_type)
{ {
@ -244,6 +249,7 @@ app.classes.calendar = AppJS.extend(
do_refresh = true; do_refresh = true;
break; break;
} }
}
if (do_refresh) if (do_refresh)
{ {
// Discard cache, reload // Discard cache, reload