From b88102618b2d3c38fe0164135582a76c3f54a24b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 7 Oct 2014 16:21:19 +0000 Subject: [PATCH] Fix calendar entries mess up after editing an integrated entry (eg. infolog) while the calendar is not the active tab (happens only in F.F.) --- calendar/js/app.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 4ab04ba118..a0f4fce8e5 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -85,7 +85,7 @@ app.classes.calendar = AppJS.extend( this._init_sidebox(sidebox); var content = this.et2.getArrayMgr('content'); - + switch (_name) { case 'calendar.list': @@ -173,7 +173,20 @@ app.classes.calendar = AppJS.extend( } else { - window.location.reload(); + var iframe = parent.jQuery(parent.document).find('.egw_fw_content_browser_iframe'); + var calTab = iframe.parentsUntil(jQuery('.egw_fw_ui_tab_content'),'.egw_fw_ui_tab_content'); + + if (!calTab.is(':visible')) + { + // F.F can not handle to style correctly an iframe which is hidden (display:none), therefore we need to + // bind a handler to refresh the calendar views after it shows up + iframe.one('show',function(){egw_refresh('','calendar');}) + } + else + { + //window.location.reload(); + window.egw_refresh('refreshing calendar','calendar'); + } } } }