Copy iTip inivitation comment to event objects and display it in calendar with the RSPV buttons (#419)
This commit is contained in:
parent
79ebe9e227
commit
4ea51417ba
6 changed files with 20 additions and 5 deletions
|
@ -534,9 +534,13 @@ function rcube_calendar_ui(settings)
|
||||||
.html(Q(rcmail.gettext('itip' + mystatus, 'libcalendaring')));
|
.html(Q(rcmail.gettext('itip' + mystatus, 'libcalendaring')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#event-rsvp')[(rsvp && !is_organizer(event) && event.status != 'CANCELLED' ? 'show' : 'hide')]();
|
var show_rsvp = rsvp && !is_organizer(event) && event.status != 'CANCELLED';
|
||||||
|
$('#event-rsvp')[(show_rsvp ? 'show' : 'hide')]();
|
||||||
$('#event-rsvp .rsvp-buttons input').prop('disabled', false).filter('input[rel='+mystatus+']').prop('disabled', true);
|
$('#event-rsvp .rsvp-buttons input').prop('disabled', false).filter('input[rel='+mystatus+']').prop('disabled', true);
|
||||||
|
|
||||||
|
if (show_rsvp && event.comment)
|
||||||
|
$('#event-rsvp-comment').show().children('.event-text').html(Q(event.comment));
|
||||||
|
|
||||||
$('#event-rsvp a.reply-comment-toggle').show();
|
$('#event-rsvp a.reply-comment-toggle').show();
|
||||||
$('#event-rsvp .itip-reply-comment textarea').hide().val('');
|
$('#event-rsvp .itip-reply-comment textarea').hide().val('');
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ $labels['quickview'] = 'View only this calendar';
|
||||||
$labels['invitationspending'] = 'Pending invitations';
|
$labels['invitationspending'] = 'Pending invitations';
|
||||||
$labels['invitationsdeclined'] = 'Declined invitations';
|
$labels['invitationsdeclined'] = 'Declined invitations';
|
||||||
$labels['changepartstat'] = 'Change participant status';
|
$labels['changepartstat'] = 'Change participant status';
|
||||||
|
$labels['rsvpcomment'] = 'Invitation text';
|
||||||
|
|
||||||
// agenda view
|
// agenda view
|
||||||
$labels['listrange'] = 'Range to display:';
|
$labels['listrange'] = 'Range to display:';
|
||||||
|
|
|
@ -717,6 +717,7 @@ a.miniColors-trigger {
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendarmain .eventdialog #event-rsvp-comment,
|
||||||
.calendarmain .eventdialog #event-created-changed {
|
.calendarmain .eventdialog #event-created-changed {
|
||||||
margin-top: 0.6em;
|
margin-top: 0.6em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,10 @@
|
||||||
<label><roundcube:label name="calendar.changed" /></label>
|
<label><roundcube:label name="calendar.changed" /></label>
|
||||||
<span class="event-text event-changed"></span>
|
<span class="event-text event-changed"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="event-line" id="event-rsvp-comment">
|
||||||
|
<label><roundcube:label name="calendar.rsvpcomment" /></label>
|
||||||
|
<span class="event-text"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<roundcube:object name="plugin.event_rsvp_buttons" id="event-rsvp" class="event-dialog-message" style="display:none" />
|
<roundcube:object name="plugin.event_rsvp_buttons" id="event-rsvp" class="event-dialog-message" style="display:none" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -465,6 +465,7 @@ class libvcalendar implements Iterator
|
||||||
case 'LOCATION':
|
case 'LOCATION':
|
||||||
case 'DESCRIPTION':
|
case 'DESCRIPTION':
|
||||||
case 'URL':
|
case 'URL':
|
||||||
|
case 'COMMENT':
|
||||||
$event[strtolower($prop->name)] = self::convert_string($prop);
|
$event[strtolower($prop->name)] = self::convert_string($prop);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -520,10 +521,6 @@ class libvcalendar implements Iterator
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'COMMENT':
|
|
||||||
$event['comment'] = $prop->value;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (substr($prop->name, 0, 2) == 'X-')
|
if (substr($prop->name, 0, 2) == 'X-')
|
||||||
$event['x-custom'][] = array($prop->name, strval($prop->value));
|
$event['x-custom'][] = array($prop->name, strval($prop->value));
|
||||||
|
|
|
@ -127,6 +127,10 @@ abstract class kolab_format_xcal extends kolab_format
|
||||||
'start' => self::php_datetime($this->obj->start()),
|
'start' => self::php_datetime($this->obj->start()),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (method_exists($this->obj, 'comment')) {
|
||||||
|
$object['comment'] = $this->obj->comment();
|
||||||
|
}
|
||||||
|
|
||||||
// read organizer and attendees
|
// read organizer and attendees
|
||||||
if (($organizer = $this->obj->organizer()) && ($organizer->email() || $organizer->name())) {
|
if (($organizer = $this->obj->organizer()) && ($organizer->email() || $organizer->name())) {
|
||||||
$object['organizer'] = array(
|
$object['organizer'] = array(
|
||||||
|
@ -340,6 +344,10 @@ abstract class kolab_format_xcal extends kolab_format
|
||||||
$this->obj->setCategories(self::array2vector($object['categories']));
|
$this->obj->setCategories(self::array2vector($object['categories']));
|
||||||
$this->obj->setUrl(strval($object['url']));
|
$this->obj->setUrl(strval($object['url']));
|
||||||
|
|
||||||
|
if (method_exists($this->obj, 'setComment')) {
|
||||||
|
$this->obj->setComment($object['comment']);
|
||||||
|
}
|
||||||
|
|
||||||
// process event attendees
|
// process event attendees
|
||||||
$attendees = new vectorattendee;
|
$attendees = new vectorattendee;
|
||||||
foreach ((array)$object['attendees'] as $attendee) {
|
foreach ((array)$object['attendees'] as $attendee) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue