Form productivity improvements

This commit is contained in:
Bernd Bestel
2017-11-10 22:45:53 +01:00
parent e4b0bbf7f7
commit 7351fce395
3 changed files with 33 additions and 0 deletions

View File

@@ -232,6 +232,18 @@ $(function()
}
});
$('#amount').on('focus', function(e)
{
if ($('#product_id_text_input').val().length === 0)
{
$('#product_id_text_input').focus();
}
else
{
$(this).select();
}
});
$('#purchase-form input').keydown(function(event)
{
if (event.keyCode === 13) //Enter