From 003850acddd03496d4f275d19e889defc7e4bbc1 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Wed, 21 Mar 2018 15:33:48 +0100 Subject: [PATCH] - fixed number format in "statistics dialog", closed #596 --- js/app/ui/dialog/stats.js | 8 ++++++-- public/js/v1.3.4/app/ui/dialog/stats.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/js/app/ui/dialog/stats.js b/js/app/ui/dialog/stats.js index 252bb3fa..ff0806e2 100644 --- a/js/app/ui/dialog/stats.js +++ b/js/app/ui/dialog/stats.js @@ -62,7 +62,11 @@ define([ // render function for numeric columns let renderNumericColumn = function(data, type, row, meta){ - return data.toLocaleString(); + let value = data; + if(type === 'display'){ + value = data.toLocaleString(); + } + return value; }; // get table element @@ -348,7 +352,7 @@ define([ }); $(sumColumnIndexes).each(function(index, value){ - $( api.column( value ).footer() ).text( renderNumericColumn(pageTotalColumns[index]) ); + $( api.column( value ).footer() ).text( renderNumericColumn(pageTotalColumns[index], 'display') ); }); }, data: [] // will be added dynamic diff --git a/public/js/v1.3.4/app/ui/dialog/stats.js b/public/js/v1.3.4/app/ui/dialog/stats.js index 252bb3fa..ff0806e2 100644 --- a/public/js/v1.3.4/app/ui/dialog/stats.js +++ b/public/js/v1.3.4/app/ui/dialog/stats.js @@ -62,7 +62,11 @@ define([ // render function for numeric columns let renderNumericColumn = function(data, type, row, meta){ - return data.toLocaleString(); + let value = data; + if(type === 'display'){ + value = data.toLocaleString(); + } + return value; }; // get table element @@ -348,7 +352,7 @@ define([ }); $(sumColumnIndexes).each(function(index, value){ - $( api.column( value ).footer() ).text( renderNumericColumn(pageTotalColumns[index]) ); + $( api.column( value ).footer() ).text( renderNumericColumn(pageTotalColumns[index], 'display') ); }); }, data: [] // will be added dynamic