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/AttributeController.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web/app/view/dialog/AttributeController.js') diff --git a/web/app/view/dialog/AttributeController.js b/web/app/view/dialog/AttributeController.js index afa970a..12e31e8 100644 --- a/web/app/view/dialog/AttributeController.js +++ b/web/app/view/dialog/AttributeController.js @@ -53,26 +53,26 @@ Ext.define('Traccar.view.dialog.AttributeController', { }, onNameChange: function (combobox, newValue) { - var type, config, attribute, valueField = this.lookupReference('valueField'); + var valueType, config, attribute, valueField = this.lookupReference('valueField'); attribute = combobox.getStore().getById(newValue); if (attribute) { - type = attribute.get('type'); + valueType = attribute.get('valueType'); config = Ext.clone(this.defaultFieldConfig); - if (type === 'number') { + if (valueType === 'number') { config.xtype = 'customNumberField'; if (attribute.get('allowDecimals') !== undefined) { config.allowDecimals = attribute.get('allowDecimals'); } else { config.allowDecimals = true; } - config.convert = attribute.get('convert'); + config.dataType = attribute.get('dataType'); config.maxValue = attribute.get('maxValue'); config.minValue = attribute.get('minValue'); - } else if (type === 'boolean') { + } else if (valueType === 'boolean') { config.xtype = 'checkboxfield'; config.inputValue = true; config.uncheckedValue = false; - } else if (type === 'color') { + } else if (valueType === 'color') { config.xtype = 'customcolorpicker'; } else { config.xtype = 'textfield'; -- cgit v1.2.3