From 74ee354f85d3eaf984050468503d8b5cdb9b8f55 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 14 Sep 2017 13:35:17 +0000 Subject: [PATCH] Style needs-action/declined events with opacity when invitation calendars are disabled (Bifrost#T38400) --- plugins/calendar/drivers/kolab/kolab_calendar.php | 13 +++++++++++-- plugins/calendar/skins/classic/calendar.css | 2 ++ plugins/calendar/skins/larry/calendar.css | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php index 236f1fd7..d6500ab9 100644 --- a/plugins/calendar/drivers/kolab/kolab_calendar.php +++ b/plugins/calendar/drivers/kolab/kolab_calendar.php @@ -725,9 +725,18 @@ class kolab_calendar extends kolab_storage_folder_api $record['links'] = $this->get_links($record['uid']); } - if ($this->get_namespace() == 'other') { + $ns = $this->get_namespace(); + + if ($ns == 'other') { $record['className'] = 'fc-event-ns-other'; - $record = kolab_driver::add_partstat_class($record, array('NEEDS-ACTION','DECLINED'), $this->get_owner()); + } + + if ($ns == 'other' || !$this->cal->rc->config->get('kolab_invitation_calendars')) { + $record = kolab_driver::add_partstat_class($record, array('NEEDS-ACTION', 'DECLINED'), $this->get_owner()); + + // Modify invitation status class name, when invitation calendars are disabled + // we'll use opacity only for declined/needs-action events + $record['className'] = str_replace('-invitation', '', $record['className']); } // add instance identifier to first occurrence (master event) diff --git a/plugins/calendar/skins/classic/calendar.css b/plugins/calendar/skins/classic/calendar.css index 4b821464..67de374f 100644 --- a/plugins/calendar/skins/classic/calendar.css +++ b/plugins/calendar/skins/classic/calendar.css @@ -1495,6 +1495,8 @@ span.spacer { font-weight: bold; } +.fc-needs-action, +.fc-declined, .cal-event-status-cancelled { opacity: 0.6; } diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css index 1a678b6f..e3497ba3 100644 --- a/plugins/calendar/skins/larry/calendar.css +++ b/plugins/calendar/skins/larry/calendar.css @@ -1945,6 +1945,8 @@ a.dropdown-link:after { font-weight: bold; } +.fc-needs-action, +.fc-declined, .cal-event-status-cancelled { opacity: 0.6; }