Commit 2e964eab by François C.

Prevent successive coop. num. input search to be considered as barcode input

parent e34556c0
...@@ -61,6 +61,7 @@ var html_elts = { ...@@ -61,6 +61,7 @@ var html_elts = {
next_shifts : $('#next_shifts') next_shifts : $('#next_shifts')
}; };
var chars = []; //input chars buffer
function fill_member_slide(member) { function fill_member_slide(member) {
no_pict_msg.hide(); no_pict_msg.hide();
...@@ -160,6 +161,7 @@ function canSearch() { ...@@ -160,6 +161,7 @@ function canSearch() {
} }
function search_member(force_search = false) { function search_member(force_search = false) {
chars = []; // to prevent false "as barcode-reader" input
if (canSearch() || force_search) { if (canSearch() || force_search) {
html_elts.member_slide.hide(); html_elts.member_slide.hide();
...@@ -666,8 +668,6 @@ html_elts.image_medium.on('click', function() { ...@@ -666,8 +668,6 @@ html_elts.image_medium.on('click', function() {
}); });
$(document).ready(function() { $(document).ready(function() {
var chars = [];
var shopping_entry_btn = $('a[data-next="shopping_entry"]'); var shopping_entry_btn = $('a[data-next="shopping_entry"]');
shopping_entry_btn.on('click', function() { shopping_entry_btn.on('click', function() {
......
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