Focus after manager select

This commit is contained in:
Barnabé 2021-09-17 10:07:15 +02:00
parent a9453ab522
commit 2f2cfb344e
2 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ function select_product_from_manager(input_id){
$('#p_product_ref_id_'+input_id).val(m_return.id);
$('#p_product_ref_name_'+input_id).val(m_return.name);
$('#p_product_ref_qte_'+input_id).focus()
});
}

View File

@ -15,7 +15,7 @@
.input-group-append
=link_to "#", class: "btn btn-dark",:onclick => "key=genRanHex(12);select_product_from_manager(key);$(this).closest('tr').find('.p_product_ref_id').attr('id', 'p_product_ref_id_'+key);$(this).closest('tr').find('.p_product_ref_name').attr('id', 'p_product_ref_name_'+key);return false;" do
=link_to "#", class: "btn btn-dark",:onclick => "key=genRanHex(12);select_product_from_manager(key);$(this).closest('tr').find('.p_product_ref_id').attr('id', 'p_product_ref_id_'+key);$(this).closest('tr').find('.p_product_ref_name').attr('id', 'p_product_ref_name_'+key);$(this).closest('tr').find('.p_product_ref_qte').attr('id', 'p_product_ref_qte_'+key);return false;" do
=ic(:search)
@ -46,7 +46,7 @@
.forced_price_wrapper.mx-2{:style => ("display:none;" if !form.object.forced_price)}= form.input :ct_u_price_ht, :label => false, :input_html => {:class => "input_price_line_ct_u_price_ht"}
%td{:style => "width:100px;"}
= form.input :qte, :label => false, :input_html => {:class => "input_price_line_qte form-control", tabindex: 1}
= form.input :qte, :label => false, :input_html => {:class => "input_price_line_qte form-control p_product_ref_qte", tabindex: 1}
%td
@ -118,4 +118,4 @@
.form-group{
margin-bottom:0;}
}
}