From bad0262c4eda2a54950d5caa9f764d78e9643bdf Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 11 Jan 2016 20:43:52 +0000 Subject: [PATCH] Do not update infolog changes if calendar is not showing infolog entries --- calendar/js/app.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index e92893d501..fe0525a0d4 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -237,12 +237,18 @@ app.classes.calendar = AppJS.extend( 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': - do_refresh = true; - break; + if (jQuery('div [data-app="infolog"][data-app_id="'+_id+'"]').length > 0) do_refresh = true; + switch (_type) + { + case 'add': + do_refresh = true; + break; + } } if (do_refresh) {