display stock with mouse selection

This commit is contained in:
Ludovic Stephan 2016-12-14 23:40:23 -02:00
parent b7ebf4ee1c
commit 75be9fd2a6

View file

@ -726,10 +726,15 @@ $(document).ready(function() {
return $article.find('.name').text();
}
function getArticleStock($article) {
return $article.find('.stock').text();
}
// Sélection des articles à la souris/tactile
articles_container.on('click', '.article', function() {
articleId.val(getArticleId($(this)));
articleSelect.val(getArticleName($(this)));
articleStock.text('/'+getArticleStock($(this)));
displayMatchedArticles(articlesList);
goToArticleNb();
});