From: Sven Schöling Date: Mon, 8 Jan 2018 15:24:18 +0000 (+0100) Subject: Part: partpicker enterverhalten direkt im picker setzen X-Git-Tag: release-3.5.4~523 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=974e8264c338823486ae5d4fcece5c4712e66833;p=kivitendo-erp.git Part: partpicker enterverhalten direkt im picker setzen Nachträglich drandongeln gibt Probleme --- diff --git a/js/kivi.Part.js b/js/kivi.Part.js index 9e79932ef..bf35cb874 100644 --- a/js/kivi.Part.js +++ b/js/kivi.Part.js @@ -755,22 +755,6 @@ namespace('kivi.Part', function(ns) { ns.reformat_number(event); }); - $('.add_makemodel_input').keydown(function(event) { - if(event.keyCode == 13) { - event.preventDefault(); - ns.add_makemodel_row(); - return false; - } - }); - - $('.add_customerprice_input').keydown(function(event) { - if(event.keyCode == 13) { - event.preventDefault(); - ns.add_customerprice_row(); - return false; - } - }); - $('#part_warehouse_id').change(kivi.Part.reload_bin_selection); ns.init(); diff --git a/templates/webpages/part/_customerprices.html b/templates/webpages/part/_customerprices.html index d7c74bcea..9384a6c8f 100644 --- a/templates/webpages/part/_customerprices.html +++ b/templates/webpages/part/_customerprices.html @@ -30,7 +30,7 @@ [% 'Customer' | $T8 %] - [% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input") %] + [% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input", action={commit_one='kivi.Part.add_customerprice_row'}) %] [% L.button_tag('kivi.Part.add_customerprice_row()', LxERP.t8('Add')) %] diff --git a/templates/webpages/part/_makemodel.html b/templates/webpages/part/_makemodel.html index b6bd29f27..71fce5a7d 100644 --- a/templates/webpages/part/_makemodel.html +++ b/templates/webpages/part/_makemodel.html @@ -31,7 +31,7 @@ [% 'Vendor' | $T8 %] - [% P.customer_vendor.picker('add_makemodel', '', type='vendor', style='width: 300px', class="add_makemodel_input") %] + [% P.customer_vendor.picker('add_makemodel', '', type='vendor', style='width: 300px', class="add_makemodel_input", action={commit_one='kivi.Part.add_makemodel_row'}) %] [% L.button_tag('kivi.Part.add_makemodel_row()', LxERP.t8('Add')) %]