Commit 96190610 by François C.

Merge branch '1492-order-press-enter' into 'dev_cooperatic'

1492 - press enter added

See merge request !90
parents b88b0203 59cec0ae
Pipeline #1650 passed with stage
in 1 minute 28 seconds
......@@ -227,7 +227,7 @@ function check_products_data() {
if (suppliers_id.length > 0) {
$.notify(
"Vérfication des informations produits...",
"Vérification des informations produits...",
{
globalPosition:"top left",
className: "info"
......@@ -1613,10 +1613,11 @@ function display_products(params) {
// On arrow up pressed, focus next row input
let next_input = $(this).closest("tr").prev().find(".product_qty_input");
next_input;
next_input.focus();
// Scroll to a position where the target input is not hidden by the sticky suppliers container
const suppliers_container_top_offset =
const suppliers_container_top_offset =
$("#suppliers_container").offset().top
- $(window).scrollTop()
+ $("#suppliers_container").outerHeight();
......@@ -1632,7 +1633,13 @@ function display_products(params) {
// On arrow down pressed, focus previous row input
$(this).closest("tr").next().find(".product_qty_input").focus();
}
} else if (e.which == 13) {
e.preventDefault();
// On enter pressed, focus previous row input
$(this).closest("tr").next().find(".product_qty_input").focus();
}
});
// Associate product to supplier on click on 'X' in the table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment