From 19a9155d988dcee7698a65a45b0558aa0ff279d4 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 11 Apr 2018 14:31:42 +0500 Subject: Implement Maintenances --- web/app/view/edit/Attributes.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'web/app/view/edit/Attributes.js') diff --git a/web/app/view/edit/Attributes.js b/web/app/view/edit/Attributes.js index cb07eda..cb0503d 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); } }] } -- cgit v1.2.3