aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/state/StateController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-15 12:24:13 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-15 12:24:13 +1200
commitd2139af877194952e3d49ca882188bcebbbd927e (patch)
treef5f6c81df6f04269a0f57d83e5fce17b8c98c346 /web/app/view/state/StateController.js
parent5cf1061cfcc5baf214bce145961512fd4f672621 (diff)
downloadtrackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.tar.gz
trackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.tar.bz2
trackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.zip
Update and format store classes
Diffstat (limited to 'web/app/view/state/StateController.js')
-rw-r--r--web/app/view/state/StateController.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 36978c3d0..bc125e529 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -95,7 +95,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'speed') {
var speedUnits = Ext.getStore('SpeedUnits');
unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || '';
- value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit);
+ value = speedUnits.formatValue(value, unit);
} else if (value instanceof Date) {
value = Ext.Date.format(value, styles.dateTimeFormat);
}
@@ -121,7 +121,7 @@ Ext.define('Traccar.view.state.StateController', {
if (key === 'distance' || key === 'odometer') {
var distanceUnits = Ext.getStore('DistanceUnits');
unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || '';
- value = distanceUnits.convert(value, unit) + ' ' + distanceUnits.getUnitName(unit);
+ value = distanceUnits.formatValue(value, unit);
}
store.add(Ext.create('Traccar.model.Attribute', {