css tweaks

This commit is contained in:
Ludovic Stephan 2016-12-20 16:48:09 -02:00
parent 5784b4d20a
commit e981cad405
2 changed files with 6 additions and 6 deletions

View file

@ -393,8 +393,7 @@ input[type=number]::-webkit-outer-spin-button {
} }
#basket tr .lowstock { #basket tr .lowstock {
visibility:hidden; display:none;
width:20px;
padding-right:15px; padding-right:15px;
} }

View file

@ -748,6 +748,7 @@ $(document).ready(function() {
addPurchase(articleId.val(), articleNb.val()); addPurchase(articleId.val(), articleNb.val());
articleSelect.val(''); articleSelect.val('');
articleNb.val(''); articleNb.val('');
articleStock.text('');
articleSelect.focus(); articleSelect.focus();
displayMatchedArticles(articlesList); displayMatchedArticles(articlesList);
return false; return false;
@ -767,7 +768,7 @@ $(document).ready(function() {
// Basket // Basket
// ----- // -----
var item_basket_default_html = '<tr><td class="amount"></td><td class="number"></td><td class="lowstock"><span class="glyphicon glyphicon-alert"></span></td><td class="name"></td></tr>'; var item_basket_default_html = '<tr><td class="amount"></td><td class="number"></td><td ><span class="lowstock glyphicon glyphicon-alert"></span></td><td class="name"></td></tr>';
var basket_container = $('#basket table'); var basket_container = $('#basket table');
var arrowKeys = /^(37|38|39|40)$/; var arrowKeys = /^(37|38|39|40)$/;
@ -805,7 +806,7 @@ $(document).ready(function() {
.find('.amount').text(amountToUKF(amount_euro, account_data['is_cof'])); .find('.amount').text(amountToUKF(amount_euro, account_data['is_cof']));
if (is_low_stock(id, nb)) if (is_low_stock(id, nb))
article_basket_html.find('.lowstock') article_basket_html.find('.lowstock')
.css('visibility', 'visible'); .show();
basket_container.prepend(article_basket_html); basket_container.prepend(article_basket_html);
updateBasketRel(); updateBasketRel();
} }
@ -951,10 +952,10 @@ $(document).ready(function() {
if (is_low_stock(id, nb_after)) if (is_low_stock(id, nb_after))
article_html.find('.lowstock') article_html.find('.lowstock')
.css('visibility', 'visible'); .show();
else else
article_html.find('.lowstock') article_html.find('.lowstock')
.css('visibility', 'hidden'); .hide();
updateExistingFormset(opeindex, nb_after, amountEuro_after); updateExistingFormset(opeindex, nb_after, amountEuro_after);
updateBasketRel(); updateBasketRel();