From: Joey Schulze Date: Sun, 8 Sep 2019 20:04:20 +0000 (+0200) Subject: Allow Plus sign instead of tab for faster typing X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Fservice.infodrom.org;a=commitdiff_plain;h=6d9e683b2ddf1f2cf27057635b9601ade0b94a7c Allow Plus sign instead of tab for faster typing --- diff --git a/src/InfoCon/sprit/list.wml b/src/InfoCon/sprit/list.wml index dd03ff0..a75522a 100644 --- a/src/InfoCon/sprit/list.wml +++ b/src/InfoCon/sprit/list.wml @@ -111,8 +111,24 @@ $(function(){ }); } }); + $('#price_liter').keydown(on_plus(function(){$('#liter').focus();})); + $('#liter').keydown(on_plus(function(){$('#price').focus();})); + $('#price').keydown(on_plus(function(){$('#km').focus();})); + $('#km').keydown(on_plus(function(){$('#km_total').focus();})); + $('#km_total').keydown(on_plus(function(){log_save();})); }); var sprit_machine = ; +function on_plus(callback) +{ + return function(e){ + // Plus sign + if (e.keyCode == 107) { + callback(); + return false; + } + + }; +} function log_new() { $('#details input').not('input[type="submit"]').val('');