diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js index 8a767ff3..0bc47a53 100644 --- a/plugins/tasklist/tasklist.js +++ b/plugins/tasklist/tasklist.js @@ -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($('').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"); diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php index 6033eb57..87687f15 100644 --- a/plugins/tasklist/tasklist.php +++ b/plugins/tasklist/tasklist.php @@ -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; }