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/dialog/ComputedAttribute.js | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'web/app/view/dialog/ComputedAttribute.js') diff --git a/web/app/view/dialog/ComputedAttribute.js b/web/app/view/dialog/ComputedAttribute.js index df074919..90234b57 100644 --- a/web/app/view/dialog/ComputedAttribute.js +++ b/web/app/view/dialog/ComputedAttribute.js @@ -19,6 +19,11 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', { extend: 'Traccar.view.dialog.BaseEdit', + requires: [ + 'Traccar.view.dialog.ComputedAttributeController' + ], + + controller: 'computedAttribute', title: Strings.sharedComputedAttribute, items: { @@ -28,20 +33,29 @@ Ext.define('Traccar.view.dialog.ComputedAttribute', { name: 'description', fieldLabel: Strings.sharedDescription }, { - xtype: 'textfield', + xtype: 'combobox', name: 'attribute', fieldLabel: Strings.sharedAttribute, - allowBlank: false + store: 'PositionAttributes', + displayField: 'name', + valueField: 'key', + listeners: { + change: 'onAttributeChange' + } }, { xtype: 'textareafield', name: 'expression', fieldLabel: Strings.sharedExpression, allowBlank: false }, { - xtype: 'textfield', + xtype: 'combobox', name: 'type', + reference: 'typeComboField', + store: 'AttributeValueTypes', fieldLabel: Strings.sharedType, - allowBlank: false + displayField: 'name', + valueField: 'id', + editable: false }] }, -- cgit v1.2.3