Render event dialog *after* reading the comment text field; don't overwrite initial invitation comments

This commit is contained in:
Thomas Bruederli 2014-08-01 10:28:05 +02:00
parent 4ea51417ba
commit e48f0dbf15
2 changed files with 7 additions and 1 deletions

View file

@ -2320,7 +2320,6 @@ function rcube_calendar_ui(settings)
delete data.rsvp; // unset RSVP flag
}
}
event_show_dialog(me.selected_event);
// submit status change to server
var submit_data = $.extend({}, me.selected_event, { source:null, comment:$('#reply-comment-event-rsvp').val() }),
@ -2333,6 +2332,8 @@ function rcube_calendar_ui(settings)
me.saving_lock = rcmail.set_busy(true, 'calendar.savingdata');
rcmail.http_post('event', { action:'rsvp', e:submit_data, status:response, noreply:noreply });
}
event_show_dialog(me.selected_event);
}
};

View file

@ -650,6 +650,11 @@ class kolab_calendar extends kolab_storage_folder_api
$event['recurrence'] = array();
}
// keep 'comment' from initial itip invitation
if (!empty($old['comment'])) {
$event['comment'] = $old['comment'];
}
// remove some internal properties which should not be saved
unset($event['_savemode'], $event['_fromcalendar'], $event['_identity'], $event['_folder_id'], $event['className']);