aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/view/edit/Devices.js4
-rw-r--r--web/app/view/edit/DevicesController.js11
2 files changed, 3 insertions, 12 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index 2b2a874..dfa855c 100644
--- a/web/app/view/edit/Devices.js
+++ b/web/app/view/edit/Devices.js
@@ -75,8 +75,8 @@ Ext.define('Traccar.view.edit.Devices', {
},
listeners: {
- selectionchange: 'onSelectionChange',
- rowclick: 'onClick'
+ rowclick: 'onSelectionChange',
+ itemkeyup: 'onSelectionChange'
},
viewConfig: {
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index c1e46b7..120944b 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -109,16 +109,7 @@ Ext.define('Traccar.view.edit.DevicesController', {
this.lookupReference('deviceCommandButton').setDisabled(empty || readonly);
},
- onSelectionChange: function (selection, selected) {
- this.updateButtons(selected);
- if (selected.length > 0) {
- this.fireEvent('selectdevice', selected[0], true);
- } else {
- this.fireEvent('deselectfeature');
- }
- },
-
- onClick: function (el, record) {
+ onSelectionChange: function (el, record) {
if (record !== undefined) {
this.updateButtons([record]);
this.fireEvent('selectdevice', record, true);