aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-12-19 05:10:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-12-19 05:10:32 +1300
commitaff5895a438c29ca3f16a5d2e19bcb81bce08529 (patch)
tree1f08a209f2f7a377a323d11e143bc5097a031032 /web/app/view
parentf08f6fa4b20f003dd624656746a49237bbff2441 (diff)
downloadtrackermap-web-aff5895a438c29ca3f16a5d2e19bcb81bce08529.tar.gz
trackermap-web-aff5895a438c29ca3f16a5d2e19bcb81bce08529.tar.bz2
trackermap-web-aff5895a438c29ca3f16a5d2e19bcb81bce08529.zip
Make group field clearable
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/dialog/Device.js26
-rw-r--r--web/app/view/dialog/Group.js26
2 files changed, 38 insertions, 14 deletions
diff --git a/web/app/view/dialog/Device.js b/web/app/view/dialog/Device.js
index ba78ca96..07d846c5 100644
--- a/web/app/view/dialog/Device.js
+++ b/web/app/view/dialog/Device.js
@@ -42,14 +42,26 @@ Ext.define('Traccar.view.dialog.Device', {
collapsible: true,
collapsed: true,
items: [{
- xtype: 'combobox',
- name: 'groupId',
+ xtype: 'fieldcontainer',
+ layout: 'hbox',
fieldLabel: Strings.groupParent,
- store: 'Groups',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'id',
- editable: false
+ items: [{
+ xtype: 'combobox',
+ name: 'groupId',
+ store: 'Groups',
+ queryMode: 'local',
+ displayField: 'name',
+ valueField: 'id',
+ width: Traccar.Style.formFieldWithButtonWidth,
+ editable: false
+ }, {
+ xtype:'button',
+ glyph: 'xf00d@FontAwesome',
+ margin: '0 0 0 3px',
+ handler: function (button) {
+ button.up().down().clearValue();
+ }
+ }]
}, {
xtype: 'textfield',
name: 'phone',
diff --git a/web/app/view/dialog/Group.js b/web/app/view/dialog/Group.js
index b517bbfb..16253fbe 100644
--- a/web/app/view/dialog/Group.js
+++ b/web/app/view/dialog/Group.js
@@ -37,14 +37,26 @@ Ext.define('Traccar.view.dialog.Group', {
collapsible: true,
collapsed: true,
items: [{
- xtype: 'combobox',
- name: 'groupId',
+ xtype: 'fieldcontainer',
+ layout: 'hbox',
fieldLabel: Strings.groupParent,
- store: 'Groups',
- queryMode: 'local',
- displayField: 'name',
- valueField: 'id',
- editable: false
+ items: [{
+ xtype: 'combobox',
+ name: 'groupId',
+ store: 'Groups',
+ queryMode: 'local',
+ displayField: 'name',
+ valueField: 'id',
+ width: Traccar.Style.formFieldWithButtonWidth,
+ editable: false
+ }, {
+ xtype:'button',
+ glyph: 'xf00d@FontAwesome',
+ margin: '0 0 0 3px',
+ handler: function (button) {
+ button.up().down().clearValue();
+ }
+ }]
}]
}]
}