Part: partpicker enterverhalten direkt im picker setzen
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 8 Jan 2018 15:24:18 +0000 (16:24 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 8 Jan 2018 17:02:26 +0000 (18:02 +0100)
Nachträglich drandongeln gibt Probleme

js/kivi.Part.js
templates/webpages/part/_customerprices.html
templates/webpages/part/_makemodel.html

index 9e79932..bf35cb8 100644 (file)
@@ -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();
index d7c74bc..9384a6c 100644 (file)
@@ -30,7 +30,7 @@
          <td></td>
          <td></td>
          <td align="right">[% 'Customer' | $T8 %]</td>
-         <td rowspan="2">[% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input") %]</td>
+         <td rowspan="2">[% P.customer_vendor.customer_picker('add_customerprice', '', style='width: 300px', class="add_customerprice_input", action={commit_one='kivi.Part.add_customerprice_row'}) %]</td>
          <td rowspan="2" align="right">[% L.button_tag('kivi.Part.add_customerprice_row()', LxERP.t8('Add')) %]</td>
         </tr>
        </tbody>
index b6bd29f..71fce5a 100644 (file)
@@ -31,7 +31,7 @@
          <td></td>
          <td></td>
          <td align="right">[% 'Vendor' | $T8 %]</td>
-         <td rowspan="2">[% P.customer_vendor.picker('add_makemodel', '', type='vendor', style='width: 300px', class="add_makemodel_input") %]</td>
+         <td rowspan="2">[% P.customer_vendor.picker('add_makemodel', '', type='vendor', style='width: 300px', class="add_makemodel_input", action={commit_one='kivi.Part.add_makemodel_row'}) %]</td>
          <td rowspan="2" align="right">[% L.button_tag('kivi.Part.add_makemodel_row()', LxERP.t8('Add')) %]</td>
         </tr>
        </tbody>