aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/dialog/AttributeController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-05-18 10:01:49 +0500
committerAbyss777 <abyss@fox5.ru>2017-05-18 16:18:26 +0500
commit788a499b346724d753798597fb18f8aef17e1588 (patch)
tree07a29a92434aba956697360d6ef867ca1a328060 /web/app/view/dialog/AttributeController.js
parent31187bc2a3ae41ab553a6472b7592895e3641fe8 (diff)
downloadtrackermap-web-788a499b346724d753798597fb18f8aef17e1588.tar.gz
trackermap-web-788a499b346724d753798597fb18f8aef17e1588.tar.bz2
trackermap-web-788a499b346724d753798597fb18f8aef17e1588.zip
Implement known position attributes
Diffstat (limited to 'web/app/view/dialog/AttributeController.js')
-rw-r--r--web/app/view/dialog/AttributeController.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/app/view/dialog/AttributeController.js b/web/app/view/dialog/AttributeController.js
index afa970ad..12e31e8e 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';