From 39663b90b3737962a31f230814073ebe7bb1dd40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 13 Aug 2015 16:14:34 +0200 Subject: [PATCH] Auftrags-Controller: zentrale Eingabezeile reagiert auf "Enter" --- templates/webpages/order/tabs/_item_input.html | 8 ++++---- templates/webpages/order/tabs/basic_data.html | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/webpages/order/tabs/_item_input.html b/templates/webpages/order/tabs/_item_input.html index 9b44a38e2..3cadcd7f7 100644 --- a/templates/webpages/order/tabs/_item_input.html +++ b/templates/webpages/order/tabs/_item_input.html @@ -13,10 +13,10 @@ - [% L.part_picker('add_item.parts_id', '', style='width: 300px') %] - [% L.input_tag('add_item.qty_as_number', '', size = 5, style='text-align:right') %] - [% L.input_tag('add_item.sellprice_as_number', '', size = 10, style='text-align:right') %] - [% L.input_tag('add_item.discount_as_percent', '', size = 5, style='text-align:right') %] + [% L.part_picker('add_item.parts_id', '', style='width: 300px', class="add_item_input") %] + [% L.input_tag('add_item.qty_as_number', '', size = 5, style='text-align:right', class="add_item_input") %] + [% L.input_tag('add_item.sellprice_as_number', '', size = 10, style='text-align:right', class="add_item_input") %] + [% L.input_tag('add_item.discount_as_percent', '', size = 5, style='text-align:right', class="add_item_input") %] [% L.button_tag('add_item()', LxERP.t8('Add part')) %] diff --git a/templates/webpages/order/tabs/basic_data.html b/templates/webpages/order/tabs/basic_data.html index 905288bf6..40badd23f 100644 --- a/templates/webpages/order/tabs/basic_data.html +++ b/templates/webpages/order/tabs/basic_data.html @@ -232,5 +232,13 @@ function display_linetotal(item_id, amount) { $(function(){ $('#order_[%- cv_id %]').change(reload_cv_dependend_selections); $('[id^="order_orderitems"][id$="parts_id"]').change(set_item_values); + $('.add_item_input').keydown(function(event) { + if(event.keyCode == 13) { + event.preventDefault(); + add_item(); + return false; + } + }); }); + -- 2.20.1