Disable recurrence and attachments forms when editing a single recurrence instance. These properties cannot be stored in recurrence exceptions
This commit is contained in:
parent
78622133a9
commit
f09948eefe
3 changed files with 17 additions and 3 deletions
|
@ -691,6 +691,8 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
// reset dialog first
|
||||
$('#eventtabs').get(0).reset();
|
||||
$('#event-panel-recurrence input, #event-panel-recurrence select, #event-panel-attachments input').prop('disabled', false);
|
||||
$('#event-panel-recurrence, #event-panel-attachments').removeClass('disabled');
|
||||
|
||||
// allow other plugins to do actions when event form is opened
|
||||
rcmail.triggerEvent('calendar-event-init', {o: event});
|
||||
|
@ -752,7 +754,7 @@ function rcube_calendar_ui(settings)
|
|||
if (event.id && event.recurrence) {
|
||||
var sel = event._savemode || (event.thisandfuture ? 'future' : (event.isexception ? 'current' : 'all'));
|
||||
$('#edit-recurring-warning').show();
|
||||
$('input.edit-recurring-savemode[value="'+sel+'"]').prop('checked', true);
|
||||
$('input.edit-recurring-savemode[value="'+sel+'"]').prop('checked', true).change();
|
||||
}
|
||||
else
|
||||
$('#edit-recurring-warning').hide();
|
||||
|
@ -803,7 +805,7 @@ function rcube_calendar_ui(settings)
|
|||
// attachments
|
||||
var load_attachments_tab = function()
|
||||
{
|
||||
rcmail.enable_command('remove-attachment', !calendar.readonly);
|
||||
rcmail.enable_command('remove-attachment', !calendar.readonly && !event.recurrence_id);
|
||||
rcmail.env.deleted_attachments = [];
|
||||
// we're sharing some code for uploads handling with app.js
|
||||
rcmail.env.attachments = [];
|
||||
|
@ -4163,6 +4165,13 @@ function rcube_calendar_ui(settings)
|
|||
event_rsvp($(this).attr('rel'))
|
||||
});
|
||||
|
||||
$('#eventedit input.edit-recurring-savemode').change(function(e) {
|
||||
var sel = $('input.edit-recurring-savemode:checked').val(),
|
||||
disabled = sel == 'current' || sel == 'future';
|
||||
$('#event-panel-recurrence input, #event-panel-recurrence select, #event-panel-attachments input').prop('disabled', disabled);
|
||||
$('#event-panel-recurrence, #event-panel-attachments')[(disabled?'addClass':'removeClass')]('disabled');
|
||||
})
|
||||
|
||||
$('#eventshow .changersvp').click(function(e) {
|
||||
var d = $('#eventshow'),
|
||||
h = -$(this).closest('.event-line').toggle().height();
|
||||
|
|
|
@ -918,9 +918,10 @@ class kolab_driver extends calendar_driver
|
|||
|
||||
case 'future':
|
||||
case 'current':
|
||||
// recurring instances shall not store recurrence rules
|
||||
// recurring instances shall not store recurrence rules and attachments
|
||||
$event['recurrence'] = array();
|
||||
$event['thisandfuture'] = $savemode == 'future';
|
||||
unset($event['attachments']);
|
||||
|
||||
// increment sequence of this instance if scheduling is affected
|
||||
if ($reschedule) {
|
||||
|
|
|
@ -676,6 +676,10 @@ a.miniColors-trigger {
|
|||
outline: none;
|
||||
}
|
||||
|
||||
#event-panel-attachments.disabled .attachmentslist li a.delete {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.event-attendees span.attendee {
|
||||
padding-right: 18px;
|
||||
margin-right: 0.5em;
|
||||
|
|
Loading…
Add table
Reference in a new issue