aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/dialog/ComputedAttribute.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/dialog/ComputedAttribute.js')
-rw-r--r--web/app/view/dialog/ComputedAttribute.js22
1 files changed, 18 insertions, 4 deletions
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
}]
},