From e76fa3aa16bb73879ec3cc83925858dab6ac9d45 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 15 Mar 2016 16:51:10 +0000 Subject: [PATCH] Stop calendar activating when an infolog is added, while still allowing a refresh --- calendar/js/app.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index c74e4916aa..f5faed8897 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1641,6 +1641,13 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( } if(changed.length && !this.state_update_in_progress) { + // This activates calendar app if you call setState from a different app + // such as home. If we change state while not active, sizing is wrong. + if(framework && framework.applications.calendar && framework.applications.calendar.hasSideboxMenuContent) + { + framework.setActiveApp(framework.applications.calendar); + } + console.log('Calendar state changed',changed.join("\n")); // Log this.egw.debug('navigation','Calendar state changed', changed.join("\n")); @@ -1708,11 +1715,6 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( */ setState: function setState(state) { - if(framework && framework.applications.calendar && framework.applications.calendar.hasSideboxMenuContent) - { - framework.setActiveApp(framework.applications.calendar); - } - // State should be an object, not a string, but we'll parse if(typeof state == "string") {