Allow tabbing via space in log form

This commit is contained in:
Sebastian Lohff 2017-01-22 22:06:28 +01:00
parent c00cace7e8
commit 994cdfb234
1 changed files with 13 additions and 0 deletions

View File

@ -117,6 +117,19 @@ $(document).ready(function() {
$("#id_call").on("input", checkForDupes); $("#id_call").on("input", checkForDupes);
$("#id_band").change(checkForDupes); $("#id_band").change(checkForDupes);
// use space to get to the next field for certain fields
function mvFocusOnSpace(e, newFocusId) {
if(e.keyCode == 32) {
$(newFocusId).focus()
return false;
}
}
$("#id_call").on("keydown", function(e) { return mvFocusOnSpace(e, "#id_otherNo"); });
$("#id_otherNo").on("keydown", function(e) { return mvFocusOnSpace(e, "#id_refStr"); });
$("#id_refStr").on("keydown", function(e) { return mvFocusOnSpace(e, "#submit-id-submit"); });
}); });
</script> </script>