Allow tabbing via space in log form

This commit is contained in:
Sebastian Lohff 2017-01-22 22:06:28 +01:00
父節點 c00cace7e8
當前提交 994cdfb234
共有 1 個文件被更改,包括 13 次插入0 次删除

查看文件

@ -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>