From eb9ae99c0fed1a77b4b012fb2dc031a6464d4b04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 20 Mar 2014 23:44:21 +0100 Subject: [PATCH] Fix WCF.String.formatNumeric() Closes #1598 --- wcfsetup/install/files/js/WCF.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index c50c51dbb1..fbcc4dfcf1 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3670,9 +3670,11 @@ WCF.String = { */ formatNumeric: function(number, decimalPlaces) { number = String(WCF.Number.round(number, decimalPlaces || 2)); - number = number.replace('.', WCF.Language.get('wcf.global.decimalPoint')); + numberParts = number.split('.'); + + number = this.addThousandsSeparator(numberParts[0]); + if (numberParts.length > 1) number += WCF.Language.get('wcf.global.decimalPoint') + numberParts[1]; - number = this.addThousandsSeparator(number); number = number.replace('-', '\u2212'); return number; -- 2.20.1