From: Jakub Vrana Date: Thu, 11 Jul 2013 23:45:52 +0000 (-0700) Subject: Format numbers in JS X-Git-Tag: v4.0.0~132 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=532861959361a84593cb7ae3ccb185e3f356c4ae;p=adminer.git Format numbers in JS --- diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 8c36bee5..2d5f2f7b 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -79,7 +79,7 @@ function trCheck(el) { * @param string */ function selectCount(id, count) { - setHtml(id, (count === '' ? '' : '(' + count + ')')); + setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')')); var inputs = document.getElementById(id).parentNode.parentNode.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++) { var input = inputs[i];