//onkeypress enter to validate range

This commit is contained in:
Vincent Augagneur
2013-08-05 18:02:08 +02:00
parent cf9d20f83b
commit ea10b94ef2

View File

@@ -284,6 +284,16 @@ function bind_inputs()
$(this).removeClass('field_error');
});
$('tr.range_sup td input:text, tr.range_inf td input:text').keypress( function (evn) {
index = $(this).parent('td').index();
if (evn.keyCode == 13)
if (validateRange(index))
enableRange(index);
else
disableRange(index);
});
$('tr.range_sup td input:text, tr.range_inf td input:text').off('change').on('change', function () {
index = $(this).parent('td').index();
if ($('tr.fees_all td:eq('+index+')').hasClass('validated') || $('tr.fees_all td:eq('+index+')').hasClass('not_validated'))