aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/Attributes.js
diff options
context:
space:
mode:
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);
}
}]
}