- fixed number format in "statistics dialog", closed #596

This commit is contained in:
Mark Friedrich
2018-03-21 15:33:48 +01:00
parent f8ea97c8fe
commit 003850acdd
2 changed files with 12 additions and 4 deletions

View File

@@ -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

View File

@@ -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