Fix tab works when editing prices

This commit is contained in:
Laurent Destailleur 2016-09-21 18:13:27 +02:00
parent 1c15539bb4
commit 494d4783a7

View File

@ -257,8 +257,14 @@ $coldisplay=-1; // We remove first td
jQuery(document).ready(function()
{
jQuery("#price_ht").keyup(function() { jQuery("#price_ttc").val(''); });
jQuery("#price_ttc").keyup(function() { jQuery("#price_ht").val(''); });
jQuery("#price_ht").keyup(function(event) {
// console.log(event.which); // discard event tag and arrows
if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#price_ht").val() != '') jQuery("#price_ttc").val('');
});
jQuery("#price_ttc").keyup(function(event) {
// console.log(event.which); // discard event tag and arrows
if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') jQuery("#price_ht").val('');
});
<?php
if (! empty($conf->margin->enabled))