From 1cbbfbd9a561af91b6edcf0cba4911b9e6f76ff0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 15 Jul 2020 13:32:10 -0600 Subject: [PATCH] Calendar: Fix push bugs - Change status from edit dialog did not push - Change participants from edit dialog did not update planner by user correctly, sometimes not added, sometimes not removed --- calendar/inc/class.calendar_boupdate.inc.php | 2 ++ calendar/inc/class.calendar_uiforms.inc.php | 3 --- calendar/js/et2_widget_planner.js | 2 ++ calendar/js/et2_widget_planner.ts | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index e4eb343a61..47750cca96 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -1746,6 +1746,8 @@ class calendar_boupdate extends calendar_bo $tracking = new calendar_tracking($this); $tracking->track($event, $old_event); + // notify the link-class about the update, as other apps may be subscribed to it + Link::notify_update('calendar',$event['id'],$event,"update"); } return $Ok; } diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index f835221fca..5989fca723 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -3199,9 +3199,6 @@ class calendar_uiforms extends calendar_ui } } } - - // notify the link-class about the update, as other apps may be subscribed to it - Link::notify_update('calendar',$event['id'],$event,"update"); } /** diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index c6236bec56..b03e2ef03c 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -222,6 +222,8 @@ var et2_calendar_planner = /** @class */ (function (_super) { if (sort_key === egw.user('account_id')) { row.set_class('current_user'); } + // Set account_id so event.owner_check can use it + row.options.owner = sort_key; // Since the daywise cache is by user, we can tap in here var t = new Date(this.options.start_date); var end = new Date(this.options.end_date); diff --git a/calendar/js/et2_widget_planner.ts b/calendar/js/et2_widget_planner.ts index 8e934ae62a..49a74c238c 100644 --- a/calendar/js/et2_widget_planner.ts +++ b/calendar/js/et2_widget_planner.ts @@ -556,6 +556,9 @@ export class et2_calendar_planner extends et2_calendar_view implements et2_IDeta { row.set_class('current_user') } + // Set account_id so event.owner_check can use it + row.options.owner = sort_key; + // Since the daywise cache is by user, we can tap in here var t = new Date(this.options.start_date); var end = new Date(this.options.end_date);