diff --git a/plugins/calendar/config.inc.php.dist b/plugins/calendar/config.inc.php.dist index 99da1edc..22705b86 100644 --- a/plugins/calendar/config.inc.php.dist +++ b/plugins/calendar/config.inc.php.dist @@ -138,8 +138,9 @@ $config['calendar_freebusy_trigger'] = false; $config['calendar_include_freebusy_data'] = 1; // SMTP server host used to send (anonymous) itip messages. -// Set to '' in order to use PHP's mail() function for email delivery. // To override the SMTP port or connection method, provide a full URL like 'tls://somehost:587' +// This will add a link to invitation messages to allow users from outside +// to reply when their mail clients do not support iTip format. $config['calendar_itip_smtp_server'] = null; // SMTP username used to send (anonymous) itip messages diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js index 5941d942..6a625b62 100644 --- a/plugins/kolab_files/kolab_files.js +++ b/plugins/kolab_files/kolab_files.js @@ -552,13 +552,21 @@ function kolab_files_folder_mount_dialog() rcmail.drivers_list_initialized = true; $('td.source', dialog).each(function() { - $(this).click(function() { + var td = $(this), + id = td.attr('id').replace('source-', ''), + meta = rcmail.env.external_sources[id]; + + $.each(meta.form_values || [], function(i, v) { + td.find('#source-' + id + '-' + i).val(v); + }); + + td.click(function() { $('td.selected', dialog).removeClass('selected'); dialog.find('.driverform').hide(); $(this).addClass('selected').find('.driverform').show(); $('input[type="radio"]', this).prop('checked', true); - }); - }); + }); + }); } args.button_classes = ['mainaction']; @@ -882,9 +890,9 @@ function kolab_dialog_submit_handler() }; // Hides dialog -function kolab_dialog_close(dialog) +function kolab_dialog_close(dialog, destroy) { - (rcmail.is_framed() ? window.parent : window).$(dialog).dialog('close'); + (rcmail.is_framed() ? window.parent : window).$(dialog).dialog(destroy ? 'destroy' : 'close'); }; // smart upload button @@ -1136,6 +1144,7 @@ function kolab_files_drag_end(e) } rcmail.command('files-move', rcmail.env.drag_target); + rcmail.env.drag_target = null; } } }; @@ -3018,7 +3027,7 @@ function kolab_files_ui() params.token = this.env.token; params.file = file; - rcmail.redirect(this.env.url + this.url('file_get', params)); + rcmail.redirect(this.env.url + this.url('file_get', params), false); }; // file(s) delete request @@ -3139,7 +3148,7 @@ function kolab_files_ui() this.file_move_ask_user = function(list, move) { var file = list[0], buttons = {}, - text = rcmail.gettext('kolab_files.filemoveconfirm').replace('$file', file.dst) + text = rcmail.gettext('kolab_files.filemoveconfirm').replace('$file', file.dst), dialog = $('
'); buttons[rcmail.gettext('kolab_files.fileoverwrite')] = function() { @@ -3149,7 +3158,8 @@ function kolab_files_ui() f[file.src] = file.dst; file_api.file_move_ask_list = list; file_api.file_move_ask_mode = move; - dialog.dialog('destroy').remove(); + kolab_dialog_close(this, true); + file_api.req = file_api.set_busy(true, move ? 'kolab_files.filemoving' : 'kolab_files.filecopying'); file_api.request(action, {file: f, overwrite: 1}, 'file_move_ask_user_response'); }; @@ -3159,14 +3169,15 @@ function kolab_files_ui() var f = {}, action = move ? 'file_move' : 'file_copy'; $.each(list, function() { f[this.src] = this.dst; }); - dialog.dialog('destroy').remove(); + kolab_dialog_close(this, true); + file_api.req = file_api.set_busy(true, move ? 'kolab_files.filemoving' : 'kolab_files.filecopying'); file_api.request(action, {file: f, overwrite: 1}, action + '_response'); }; var skip_func = function() { list.shift(); - dialog.dialog('destroy').remove(); + kolab_dialog_close(this, true); if (list.length) file_api.file_move_ask_user(list, move); @@ -3178,7 +3189,7 @@ function kolab_files_ui() if (list.length > 1) buttons[rcmail.gettext('kolab_files.fileskipall')] = function() { - dialog.dialog('destroy').remove(); + kolab_dialog_close(this, true); if (move) file_api.file_list(); }; @@ -3187,6 +3198,7 @@ function kolab_files_ui() kolab_dialog_show(dialog.html(text), { close: skip_func, buttons: buttons, + height: 50, minWidth: 400, width: 400 }); diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php index b960e9a4..4a4e88d5 100644 --- a/plugins/libcalendaring/lib/libcalendaring_itip.php +++ b/plugins/libcalendaring/lib/libcalendaring_itip.php @@ -44,7 +44,6 @@ class libcalendaring_itip array('identity' => $this->rc->user->list_emails(true))); $this->sender = $hook['identity']; - $this->plugin->add_hook('message_before_send', array($this, 'before_send_hook')); $this->plugin->add_hook('smtp_connect', array($this, 'smtp_connect_hook')); } @@ -152,7 +151,10 @@ class libcalendaring_itip // } // append links for direct invitation replies - if ($method == 'REQUEST' && $rsvp && ($token = $this->store_invitation($event, $recipient['email']))) { + if ($method == 'REQUEST' && $rsvp + && $this->rc->config->get('calendar_itip_smtp_server') + && ($token = $this->store_invitation($event, $recipient['email'])) + ) { $mailbody .= "\n\n" . $this->gettext(array( 'name' => 'invitationattendlinks', 'vars' => array('url' => $this->plugin->get_url(array('action' => 'attend', 't' => $token))), @@ -177,20 +179,6 @@ class libcalendaring_itip return $sent; } - /** - * Plugin hook triggered by rcube::deliver_message() before delivering a message. - * Here we can set the 'smtp_server' config option to '' in order to use - * PHP's mail() function for unauthenticated email sending. - */ - public function before_send_hook($p) - { - if ($this->itip_send && !$this->rc->user->ID && $this->rc->config->get('calendar_itip_smtp_server', null) === '') { - $this->rc->config->set('smtp_server', ''); - } - - return $p; - } - /** * Plugin hook to alter SMTP authentication. * This is used if iTip messages are to be sent from an unauthenticated session