diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-15 12:24:13 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-15 12:24:13 +1200 |
commit | d2139af877194952e3d49ca882188bcebbbd927e (patch) | |
tree | f5f6c81df6f04269a0f57d83e5fce17b8c98c346 /web/app/view | |
parent | 5cf1061cfcc5baf214bce145961512fd4f672621 (diff) | |
download | trackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.tar.gz trackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.tar.bz2 trackermap-server-d2139af877194952e3d49ca882188bcebbbd927e.zip |
Update and format store classes
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/report/Report.js | 2 | ||||
-rw-r--r-- | web/app/view/state/StateController.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 8b86b9cc7..8a1dae9c4 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -91,7 +91,7 @@ Ext.define('Traccar.view.report.Report', { renderer: function(value) { var speedUnits = Ext.getStore('SpeedUnits'); var unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || ''; - return speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit); + return speedUnits.formatValue(value, unit); } }, { text: strings.positionAddress, dataIndex: 'address', flex: 1 } 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', { |