From 4aa9229a096c289033ee5a2d19805e51aee2fb46 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 11 Sep 2019 17:25:03 +0200 Subject: [PATCH] Added update with enter --- assets/js/admin.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/js/admin.js b/assets/js/admin.js index 5791f62..b4a80a3 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -17,6 +17,15 @@ function getList() { '' + (item.coins_quota).toFixed(2) + ' ' + '    '); } + + $('#kcoins_' + item.id).on('keypress', function (e) { + if(e.which === 13){ + $(this).attr('disabled', 'disabled'); + updateCoins(item.id); + $(this).removeAttr('disabled'); + } + }); + }); }); }