diff --git a/templates/contest/log.html b/templates/contest/log.html index 78b5080..997ccfc 100644 --- a/templates/contest/log.html +++ b/templates/contest/log.html @@ -117,6 +117,19 @@ $(document).ready(function() { $("#id_call").on("input", 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"); }); + });