From 60450ce640ac0eda649b66efaf7d67909d1e9dad Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 18 Feb 2021 13:45:50 -0700 Subject: [PATCH] Calendar: Fix update if hidden for more than one user's calendar in week view --- calendar/js/et2_widget_daycol.js | 6 ++++-- calendar/js/et2_widget_daycol.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 169d4ad5d9..4e31254ac0 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -312,8 +312,10 @@ var et2_calendar_daycol = /** @class */ (function (_super) { // Not visible, defer the layout or it all winds up at the top // Cancel any existing listener & bind jQuery(this.getInstanceManager().DOMContainer.parentNode) - .off('show.et2_daycol' + this.id) - .one('show.et2_daycol' + this.id, function () { this._update_events(events); }.bind(this)); + .off('show.' + CalendarApp._daywise_cache_id(this.options.date, this.options.owner)) + .one('show.' + CalendarApp._daywise_cache_id(this.options.date, this.options.owner), function () { + this._update_events(events); + }.bind(this)); return; } if (!this.getParent().disabled) diff --git a/calendar/js/et2_widget_daycol.ts b/calendar/js/et2_widget_daycol.ts index ad9cef65ff..e9ffe7adc0 100644 --- a/calendar/js/et2_widget_daycol.ts +++ b/calendar/js/et2_widget_daycol.ts @@ -410,8 +410,10 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache // Not visible, defer the layout or it all winds up at the top // Cancel any existing listener & bind jQuery(this.getInstanceManager().DOMContainer.parentNode) - .off('show.et2_daycol'+this.id) - .one('show.et2_daycol'+this.id, function() {this._update_events(events)}.bind(this)); + .off('show.'+CalendarApp._daywise_cache_id(this.options.date, this.options.owner)) + .one('show.'+CalendarApp._daywise_cache_id(this.options.date, this.options.owner), function() { + this._update_events(events) + }.bind(this)); return; } if(!this.getParent().disabled)