plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Thu Jan 29 12:26:58 CET 2015
plugins/calendar/calendar.php | 5 +++++
plugins/calendar/calendar_ui.js | 8 ++++++++
2 files changed, 13 insertions(+)
New commits:
commit 44216168f1e03add8581e3235a8b7d8ccd116857
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Thu Jan 29 12:26:50 2015 +0100
Set free_busy status to transparent when declining an invitation (#4425)
diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 59008db..a288cb5 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -972,6 +972,7 @@ class calendar extends rcube_plugin
$ev = $this->driver->get_event($event);
$ev['attendees'] = $event['attendees'];
+ $ev['free_busy'] = $event['free_busy'];
// send invitation to delegatee + add it as attendee
if ($status == 'delegated' && $event['to']) {
@@ -2687,6 +2688,7 @@ class calendar extends rcube_plugin
$metadata['attendee'] = $attendee['email'];
$metadata['rsvp'] = $attendee['role'] != 'NON-PARTICIPANT';
$reply_sender = $attendee['email'];
+ $event_attendee = $attendee;
}
}
@@ -2809,6 +2811,9 @@ class calendar extends rcube_plugin
$error_msg = $this->gettext('newerversionexists');
}
else if (!$existing && ($status != 'declined' || $this->rc->config->get('kolab_invitation_calendars'))) {
+ if ($status == 'declined' || $event['status'] == 'CANCELLED' || $event_attendee['role'] == 'NON-PARTICIPANT') {
+ $event['free_busy'] = 'free';
+ }
$success = $this->driver->new_event($event);
}
else if ($status == 'declined')
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 598a4d7..8e903c5 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -2401,6 +2401,14 @@ function rcube_calendar_ui(settings)
}
}
}
+
+ // set free_busy status to transparent if declined (#4425)
+ if (data.status == 'DECLINED' || data.role == 'NON-PARTICIPANT') {
+ me.selected_event.free_busy = 'free';
+ }
+ else {
+ me.selected_event.free_busy = 'busy';
+ }
}
// submit status change to server
More information about the commits
mailing list