Fix errors in tasks export (T1355)
This commit is contained in:
parent
f5ac7a872e
commit
d8a1ea3018
2 changed files with 11 additions and 4 deletions
|
@ -837,7 +837,9 @@ function rcube_tasklist_ui(settings)
|
|||
$("#task-export-list").val('');
|
||||
|
||||
buttons[rcmail.gettext('export', 'tasklist')] = function() {
|
||||
var source = $('#task-export-list option:selected').val();
|
||||
var data = {},
|
||||
source = $('#task-export-list option:selected').val(),
|
||||
form_elements = $('select, input', form);
|
||||
|
||||
// "current view" export, use hidden form to POST task IDs
|
||||
if (source === '') {
|
||||
|
@ -852,7 +854,7 @@ function rcube_tasklist_ui(settings)
|
|||
});
|
||||
|
||||
// copy form inputs, there may be controls added by other plugins
|
||||
$('#tasksexport select, #tasksexport input').each(function() {
|
||||
form_elements.each(function() {
|
||||
if (this.type != 'checkbox' || this.checked)
|
||||
inputs.push($('<input>').attr({type: 'hidden', name: this.name, value: this.value}));
|
||||
});
|
||||
|
@ -869,7 +871,12 @@ function rcube_tasklist_ui(settings)
|
|||
}
|
||||
// otherwise we can use simple GET
|
||||
else {
|
||||
rcmail.goto_url('export', {source: source, attachments: attach});
|
||||
form_elements.each(function() {
|
||||
if (this.type != 'checkbox' || this.checked)
|
||||
data[this.name] = $(this).val();
|
||||
});
|
||||
|
||||
rcmail.goto_url('export', data);
|
||||
}
|
||||
|
||||
$dialog.dialog("close");
|
||||
|
|
|
@ -1647,7 +1647,7 @@ class tasklist extends rcube_plugin
|
|||
header("Content-Type: text/calendar");
|
||||
header("Content-Disposition: inline; filename=\"". $plugin['filename'] ."\"");
|
||||
|
||||
$this->get_ical()->export($plugin['tasks'], '', true,
|
||||
$this->get_ical()->export($plugin['result'], '', true,
|
||||
$plugins['attachments'] ? array($this->driver, 'get_attachment_body') : null);
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue