mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
sempre retorna o focus para input search em page balcao
This commit is contained in:
@@ -73,10 +73,10 @@
|
|||||||
<h2 style="text-align: center;">Buscar Produto </h2>
|
<h2 style="text-align: center;">Buscar Produto </h2>
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<input
|
<input
|
||||||
oninput="searchProduct()"
|
|
||||||
type="text"
|
|
||||||
id="search-product"
|
id="search-product"
|
||||||
name="search-product"
|
name="search-product"
|
||||||
|
type="text"
|
||||||
|
oninput="searchProduct()"
|
||||||
autofocus
|
autofocus
|
||||||
placeholder="Buscar Produto"
|
placeholder="Buscar Produto"
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -91,6 +91,7 @@ function addProductBalcao() {
|
|||||||
const imprimir = document.getElementById('imprimirFichas')
|
const imprimir = document.getElementById('imprimirFichas')
|
||||||
receber.removeAttribute('disabled');
|
receber.removeAttribute('disabled');
|
||||||
imprimir.removeAttribute('disabled');
|
imprimir.removeAttribute('disabled');
|
||||||
|
document.getElementById('search-product').focus()
|
||||||
fieldQtd.value = 1;
|
fieldQtd.value = 1;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateTotal();}, 100);
|
updateTotal();}, 100);
|
||||||
@@ -98,7 +99,6 @@ function addProductBalcao() {
|
|||||||
|
|
||||||
|
|
||||||
function removeProductBalcao(id) {
|
function removeProductBalcao(id) {
|
||||||
|
|
||||||
const url = `/balcao/removeProductBalcao${id}/`;
|
const url = `/balcao/removeProductBalcao${id}/`;
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@@ -110,10 +110,9 @@ function removeProductBalcao(id) {
|
|||||||
var listProductsBalcaoElement = document.getElementById("list-products-balcao");
|
var listProductsBalcaoElement = document.getElementById("list-products-balcao");
|
||||||
listProductsBalcaoElement.innerHTML = text;
|
listProductsBalcaoElement.innerHTML = text;
|
||||||
})
|
})
|
||||||
|
document.getElementById('search-product').focus()
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateTotal();}, 100);
|
updateTotal();}, 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -161,8 +160,11 @@ function addProductClick(productId, comandaId) {
|
|||||||
|
|
||||||
const receber = document.getElementById('pagarComanda')
|
const receber = document.getElementById('pagarComanda')
|
||||||
const imprimir = document.getElementById('imprimirFichas')
|
const imprimir = document.getElementById('imprimirFichas')
|
||||||
|
var search = document.getElementById('search-product')
|
||||||
receber.removeAttribute('disabled');
|
receber.removeAttribute('disabled');
|
||||||
imprimir.removeAttribute('disabled');
|
imprimir.removeAttribute('disabled');
|
||||||
|
search.focus()
|
||||||
|
// search.setAttribute('autofocus');
|
||||||
fieldQtd.value = 1;
|
fieldQtd.value = 1;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user