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')));
|
||||
}
|
||||
|
||||
$('#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);
|
||||
|
||||
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 .itip-reply-comment textarea').hide().val('');
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ $labels['quickview'] = 'View only this calendar';
|
|||
$labels['invitationspending'] = 'Pending invitations';
|
||||
$labels['invitationsdeclined'] = 'Declined invitations';
|
||||
$labels['changepartstat'] = 'Change participant status';
|
||||
$labels['rsvpcomment'] = 'Invitation text';
|
||||
|
||||
// agenda view
|
||||
$labels['listrange'] = 'Range to display:';
|
||||
|
|
|
@ -717,6 +717,7 @@ a.miniColors-trigger {
|
|||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.calendarmain .eventdialog #event-rsvp-comment,
|
||||
.calendarmain .eventdialog #event-created-changed {
|
||||
margin-top: 0.6em;
|
||||
}
|
||||
|
|
|
@ -142,6 +142,10 @@
|
|||
<label><roundcube:label name="calendar.changed" /></label>
|
||||
<span class="event-text event-changed"></span>
|
||||
</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" />
|
||||
</div>
|
||||
|
|
|
@ -465,6 +465,7 @@ class libvcalendar implements Iterator
|
|||
case 'LOCATION':
|
||||
case 'DESCRIPTION':
|
||||
case 'URL':
|
||||
case 'COMMENT':
|
||||
$event[strtolower($prop->name)] = self::convert_string($prop);
|
||||
break;
|
||||
|
||||
|
@ -520,10 +521,6 @@ class libvcalendar implements Iterator
|
|||
}
|
||||
break;
|
||||
|
||||
case 'COMMENT':
|
||||
$event['comment'] = $prop->value;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (substr($prop->name, 0, 2) == 'X-')
|
||||
$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()),
|
||||
);
|
||||
|
||||
if (method_exists($this->obj, 'comment')) {
|
||||
$object['comment'] = $this->obj->comment();
|
||||
}
|
||||
|
||||
// read organizer and attendees
|
||||
if (($organizer = $this->obj->organizer()) && ($organizer->email() || $organizer->name())) {
|
||||
$object['organizer'] = array(
|
||||
|
@ -340,6 +344,10 @@ abstract class kolab_format_xcal extends kolab_format
|
|||
$this->obj->setCategories(self::array2vector($object['categories']));
|
||||
$this->obj->setUrl(strval($object['url']));
|
||||
|
||||
if (method_exists($this->obj, 'setComment')) {
|
||||
$this->obj->setComment($object['comment']);
|
||||
}
|
||||
|
||||
// process event attendees
|
||||
$attendees = new vectorattendee;
|
||||
foreach ((array)$object['attendees'] as $attendee) {
|
||||
|
|
Loading…
Add table
Reference in a new issue