</thead>
<tbody>
<tr valign="top" class="listrow">
- <td>[% L.part_picker('add_item.parts_id', '', style='width: 300px') %]</td>
- <td>[% L.input_tag('add_item.qty_as_number', '', size = 5, style='text-align:right') %]</td>
- <td>[% L.input_tag('add_item.sellprice_as_number', '', size = 10, style='text-align:right') %]</td>
- <td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, style='text-align:right') %]</td>
+ <td>[% L.part_picker('add_item.parts_id', '', style='width: 300px', class="add_item_input") %]</td>
+ <td>[% L.input_tag('add_item.qty_as_number', '', size = 5, style='text-align:right', class="add_item_input") %]</td>
+ <td>[% L.input_tag('add_item.sellprice_as_number', '', size = 10, style='text-align:right', class="add_item_input") %]</td>
+ <td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, style='text-align:right', class="add_item_input") %]</td>
<td>[% L.button_tag('add_item()', LxERP.t8('Add part')) %]</td>
</tr>
</tbody>
$(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;
+ }
+ });
});
+
</script>