From 788a499b346724d753798597fb18f8aef17e1588 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 18 May 2017 10:01:49 +0500 Subject: Implement known position attributes --- web/app/view/edit/ComputedAttributes.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'web/app/view/edit/ComputedAttributes.js') diff --git a/web/app/view/edit/ComputedAttributes.js b/web/app/view/edit/ComputedAttributes.js index 87d3b8d..741a104 100644 --- a/web/app/view/edit/ComputedAttributes.js +++ b/web/app/view/edit/ComputedAttributes.js @@ -46,13 +46,29 @@ Ext.define('Traccar.view.edit.ComputedAttributes', { dataIndex: 'description' }, { text: Strings.sharedAttribute, - dataIndex: 'attribute' + dataIndex: 'attribute', + renderer: function (value) { + var attribute = Ext.getStore('PositionAttributes').getById(value); + if (attribute) { + return attribute.get('name'); + } else { + return value; + } + } }, { text: Strings.sharedExpression, dataIndex: 'expression' }, { text: Strings.sharedType, - dataIndex: 'type' + dataIndex: 'type', + renderer: function (value) { + var type = Ext.getStore('AttributeValueTypes').getById(value); + if (type) { + return type.get('name'); + } else { + return value; + } + } }] } }); -- cgit v1.2.3