From d3914ea58eaa5e757a3a75f61468902f17fb9b9a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 6 Feb 2018 14:46:50 +0100 Subject: [PATCH] Translate thousands separator in JS --- adminer/include/design.inc.php | 1 + adminer/static/functions.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 28b159c6..ac09ba78 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -58,6 +58,7 @@ mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick}); document.body.className = document.body.className.replace(/ nojs/, ' js'); var offlineMessage = ''; +var thousandsSeparator = ''; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 4549ec6a..3dde40e4 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -172,9 +172,10 @@ function trCheck(el) { /** Fill number of selected items * @param string * @param string +* @uses thousandsSeparator */ function selectCount(id, count) { - setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')')); + setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, thousandsSeparator) + ')')); var el = qs('#' + id); if (el) { var inputs = qsa('input', el.parentNode.parentNode); @@ -580,6 +581,7 @@ function fieldChange() { * @param [string] * @param [string] * @return XMLHttpRequest or false in case of an error +* @uses offlineMessage */ function ajax(url, callback, data, message) { var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));