summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/calendar/drivers/kolab/kolab_calendar.php5
-rw-r--r--plugins/calendar/drivers/kolab/kolab_driver.php24
-rw-r--r--plugins/calendar/drivers/kolab/kolab_invitation_calendar.php16
-rw-r--r--plugins/calendar/skins/larry/calendar.css9
4 files changed, 41 insertions, 13 deletions
diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php
index 404d35c..850a12f 100644
--- a/plugins/calendar/drivers/kolab/kolab_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_calendar.php
@@ -674,6 +674,11 @@ class kolab_calendar extends kolab_storage_folder_api
$record['calendar'] = $this->id;
$record['links'] = $this->get_links($record['uid']);
+ if ($this->get_namespace() == 'other') {
+ $record['className'] = 'fc-event-ns-other';
+ $record = kolab_driver::add_partstat_class($record, array('NEEDS-ACTION','DECLINED'), $this->get_owner());
+ }
+
return kolab_driver::to_rcube_event($record);
}
diff --git a/plugins/calendar/drivers/kolab/kolab_driver.php b/plugins/calendar/drivers/kolab/kolab_driver.php
index 8720dd8..559931c 100644
--- a/plugins/calendar/drivers/kolab/kolab_driver.php
+++ b/plugins/calendar/drivers/kolab/kolab_driver.php
@@ -1422,6 +1422,30 @@ class kolab_driver extends calendar_driver
}
/**
+ * Set CSS class according to the event's attendde partstat
+ */
+ public static function add_partstat_class($event, $partstats, $user = null)
+ {
+ // set classes according to PARTSTAT
+ if (is_array($event['attendees'])) {
+ $user_emails = libcalendaring::get_instance()->get_user_emails($user);
+ $partstat = 'UNKNOWN';
+ foreach ($event['attendees'] as $attendee) {
+ if (in_array($attendee['email'], $user_emails)) {
+ $partstat = $attendee['status'];
+ break;
+ }
+ }
+
+ if (in_array($partstat, $partstats)) {
+ $event['className'] = trim($event['className'] . ' fc-invitation-' . strtolower($partstat));
+ }
+ }
+
+ return $event;
+ }
+
+ /**
* Provide a list of revisions for the given event
*
* @param array $event Hash array with event properties
diff --git a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
index a2e9cf2..a78c5a8 100644
--- a/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
+++ b/plugins/calendar/drivers/kolab/kolab_invitation_calendar.php
@@ -276,20 +276,10 @@ class kolab_invitation_calendar
private function _mod_event($event)
{
// set classes according to PARTSTAT
- if (is_array($event['attendees'])) {
- $user_emails = $this->cal->get_user_emails();
- $partstat = 'UNKNOWN';
- foreach ($event['attendees'] as $attendee) {
- if (in_array($attendee['email'], $user_emails)) {
- $partstat = $attendee['status'];
- break;
- }
- }
+ $event = kolab_driver::add_partstat_class($event, $this->partstats);
- if (in_array($partstat, $this->partstats)) {
- $event['className'] = 'fc-invitation-' . strtolower($partstat);
- $event['calendar'] = $this->id;
- }
+ if (strpos($event['className'], 'fc-invitation-') !== false) {
+ $event['calendar'] = $this->id;
}
return $event;
diff --git a/plugins/calendar/skins/larry/calendar.css b/plugins/calendar/skins/larry/calendar.css
index 052860c..9555031 100644
--- a/plugins/calendar/skins/larry/calendar.css
+++ b/plugins/calendar/skins/larry/calendar.css
@@ -1883,6 +1883,15 @@ a.dropdown-link:after {
border: 1px dashed #c00 !important;
}
+.fc-event-vert.fc-event-ns-other.fc-invitation-declined,
+.fc-event-hori.fc-event-ns-other.fc-invitation-declined {
+ opacity: 0.7;
+}
+
+.fc-event-ns-other.fc-invitation-declined .fc-event-title {
+ text-decoration: line-through;
+}
+
.fc-event-vert.fc-invitation-tentative .fc-event-head,
.fc-event-vert.fc-invitation-declined .fc-event-head,
.fc-event-vert.fc-invitation-needs-action .fc-event-head {