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,12 +237,18 @@ app.classes.calendar = AppJS.extend(
if (match[1]== _id) do_refresh = true; if (match[1]== _id) do_refresh = true;
} }
}); });
if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true;
switch (_type) // 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')
{ {
case 'add': if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true;
do_refresh = true; switch (_type)
break; {
case 'add':
do_refresh = true;
break;
}
} }
if (do_refresh) if (do_refresh)
{ {