Fix unavailable comment field on itip-append page

This commit is contained in:
Aleksander Machniak 2017-03-27 13:07:24 +02:00
parent a639eabd1f
commit 592163d83d
2 changed files with 15 additions and 8 deletions

View file

@ -721,10 +721,22 @@ class libcalendaring_itip
}
// add input field for reply comment
$rsvp_additions .= html::a(array('href' => '#toggle', 'class' => 'reply-comment-toggle'), $this->gettext('itipeditresponse'));
$rsvp_additions .= html::div('itip-reply-comment',
html::tag('textarea', array('id' => 'reply-comment-'.$dom_id, 'name' => '_comment', 'cols' => 40, 'rows' => 6, 'style' => 'display:none', 'placeholder' => $this->gettext('itipcomment')), '')
$toggle_attrib = array(
'href' => '#toggle',
'class' => 'reply-comment-toggle',
'onclick' => '$(this).hide().parent().find(\'textarea\').show().focus()'
);
$textarea_attrib = array(
'id' => 'reply-comment-' . $dom_id,
'name' => '_comment',
'cols' => 40,
'rows' => 6,
'style' => 'display:none',
'placeholder' => $this->gettext('itipcomment')
);
$rsvp_additions .= html::a($toggle_attrib, $this->gettext('itipeditresponse'))
. html::div('itip-reply-comment', html::tag('textarea', $textarea_attrib, ''));
return $rsvp_additions;
}

View file

@ -1381,11 +1381,6 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
.addEventListener('plugin.fetch_itip_object_status', rcube_libcalendaring.fetch_itip_object_status)
.addEventListener('plugin.itip_message_processed', rcube_libcalendaring.itip_message_processed);
$('.rsvp-buttons').on('click', 'a.reply-comment-toggle', function(e){
$(this).hide().parent().find('textarea').show().focus();
return false;
});
if (rcmail.env.action == 'get-attachment' && rcmail.gui_objects['attachmentframe']) {
rcmail.register_command('print-attachment', function() {
var frame = rcmail.get_frame_window(rcmail.gui_objects['attachmentframe'].id);