From: Bernd Bleßmann Date: Mon, 7 Mar 2016 21:51:45 +0000 (+0100) Subject: Auftrags-Controller: serializeArray und push statt serialize und += auf Strings X-Git-Tag: release-3.4.1~332 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=46d3bb6e2f544e82ed36ce6fa08bf48f74a54cc9;p=kivitendo-erp.git Auftrags-Controller: serializeArray und push statt serialize und += auf Strings --- diff --git a/templates/webpages/order/form.html b/templates/webpages/order/form.html index 20b39a232..df5163146 100644 --- a/templates/webpages/order/form.html +++ b/templates/webpages/order/form.html @@ -52,40 +52,41 @@ function delete_order() { function save() { if (!check_cv()) return; - var data = $('#order_form').serialize(); - data += '&action=Order/save'; + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/save' }); $.post("controller.pl", data, kivi.eval_json_result); } function create_pdf() { if (!check_cv()) return; - var data = $('#order_form').serialize(); - data += '&action=Order/create_pdf'; + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/create_pdf' }); $.post("controller.pl", data, kivi.eval_json_result); } function download_pdf(pdf_filename, key) { - var data = 'action=Order/download_pdf'; - data += '&type=' + $('#type').val(); - data += '&pdf_filename=' + pdf_filename; - data += '&key=' + key; + var data = []; + data.push({ name: 'action', value: 'Order/download_pdf' }); + data.push({ name: 'type', value: $('#type').val() }); + data.push({ name: 'pdf_filename', value: pdf_filename }); + data.push({ name: 'key', value: key }); $.download("controller.pl", data); } function email() { if (!check_cv()) return; - var data = $('#order_form').serialize(); - data += '&action=Order/show_email_dialog'; + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/show_email_dialog' }); $.post("controller.pl", data, kivi.eval_json_result); } function save_and_delivery_order() { if (!check_cv()) return; - var data = $('#order_form').serialize(); - data += '&action=Order/save_and_delivery_order'; + var data = $('#order_form').serializeArray(); + data.push({ name: 'action', value: 'Order/save_and_delivery_order' }); $.post("controller.pl", data, kivi.eval_json_result); } diff --git a/templates/webpages/order/tabs/_email_dialog.html b/templates/webpages/order/tabs/_email_dialog.html index 3c6df7f76..a69e1f5b0 100644 --- a/templates/webpages/order/tabs/_email_dialog.html +++ b/templates/webpages/order/tabs/_email_dialog.html @@ -54,10 +54,9 @@ diff --git a/templates/webpages/order/tabs/_multi_items_dialog.html b/templates/webpages/order/tabs/_multi_items_dialog.html index cb1fc3ea8..710c332f0 100644 --- a/templates/webpages/order/tabs/_multi_items_dialog.html +++ b/templates/webpages/order/tabs/_multi_items_dialog.html @@ -23,8 +23,8 @@