aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/state/StateController.js
diff options
context:
space:
mode:
authoramilasilva88 <amilasilva88@gmail.com>2015-08-13 20:28:58 +0800
committeramilasilva88 <amilasilva88@gmail.com>2015-08-13 20:28:58 +0800
commit0350d762a7c08199e79dc401b6c6821d7e2a21bd (patch)
tree5b0751fb43278026aee2c153ae131e17776beecd /web/app/view/state/StateController.js
parenta5b29b0e5df4ba84c8eaa8944258b9c9e12472db (diff)
downloadtrackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.tar.gz
trackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.tar.bz2
trackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.zip
Added ODOMeter and Modification to Mobile UI
Diffstat (limited to 'web/app/view/state/StateController.js')
-rw-r--r--web/app/view/state/StateController.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js
index 58b63120b..858feab52 100644
--- a/web/app/view/state/StateController.js
+++ b/web/app/view/state/StateController.js
@@ -59,9 +59,13 @@ Ext.define('Traccar.view.state.StateController', {
priority: 6,
name: strings.positionSpeed
},
- 'course': {
+/* 'course': {
priority: 7,
name: strings.positionCourse
+ },*/
+ 'odoMeter': {
+ priority: 7,
+ name: 'ODO Meter'
},
'address': {
priority: 8,
@@ -87,6 +91,13 @@ Ext.define('Traccar.view.state.StateController', {
var unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || '';
value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit);
}
+
+ if (key === 'odoMeter') {
+ var distanceUnits = Ext.getStore('DistanceUnits');
+ var unit = Traccar.getApplication().getUser().get('distanceUnit') || Traccar.getApplication().getServer().get('distanceUnit') || '';
+ value = distanceUnits.convert(value, unit) + ' ' + distanceUnits.getUnitName(unit);
+ }
+
store.add(Ext.create('Traccar.model.Parameter', {
priority: this.keys[key].priority,
name: this.keys[key].name,