From 974e8264c338823486ae5d4fcece5c4712e66833 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 8 Jan 2018 16:24:18 +0100 Subject: [PATCH] Part: partpicker enterverhalten direkt im picker setzen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Nachträglich drandongeln gibt Probleme --- js/kivi.Part.js | 16 ---------------- templates/webpages/part/_customerprices.html | 2 +- templates/webpages/part/_makemodel.html | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) 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')) %] -- 2.20.1