aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/Attributes.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-04-11 14:31:42 +0500
committerAbyss777 <abyss@fox5.ru>2018-04-19 12:15:59 +0500
commit19a9155d988dcee7698a65a45b0558aa0ff279d4 (patch)
treecea9ae5c73a625d01bc06df5742228b5cbbd1def /web/app/view/edit/Attributes.js
parent4e7d2b8fdb41390205d69997d61db536545f5564 (diff)
downloadtrackermap-web-19a9155d988dcee7698a65a45b0558aa0ff279d4.tar.gz
trackermap-web-19a9155d988dcee7698a65a45b0558aa0ff279d4.tar.bz2
trackermap-web-19a9155d988dcee7698a65a45b0558aa0ff279d4.zip
Implement Maintenances
Diffstat (limited to 'web/app/view/edit/Attributes.js')
-rw-r--r--web/app/view/edit/Attributes.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/web/app/view/edit/Attributes.js b/web/app/view/edit/Attributes.js
index cb07eda1..cb0503de 100644
--- a/web/app/view/edit/Attributes.js
+++ b/web/app/view/edit/Attributes.js
@@ -58,13 +58,7 @@ Ext.define('Traccar.view.edit.Attributes', {
if (this.attributesStore) {
attribute = Ext.getStore(this.attributesStore).getById(record.get('name'));
}
- if (attribute && attribute.get('dataType') === 'speed') {
- return Ext.getStore('SpeedUnits').formatValue(value, Traccar.app.getAttributePreference('speedUnit', 'kn'), true);
- } else if (attribute && attribute.get('dataType') === 'distance') {
- return Ext.getStore('DistanceUnits').formatValue(value, Traccar.app.getAttributePreference('distanceUnit', 'km'), true);
- } else {
- return value;
- }
+ return Traccar.AttributeFormatter.renderAttribute(value, attribute);
}
}]
}