aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/edit')
-rw-r--r--web/app/view/edit/Devices.js3
-rw-r--r--web/app/view/edit/DevicesController.js10
2 files changed, 6 insertions, 7 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index 21fdb32a..dfa855c8 100644
--- a/web/app/view/edit/Devices.js
+++ b/web/app/view/edit/Devices.js
@@ -75,7 +75,8 @@ Ext.define('Traccar.view.edit.Devices', {
},
listeners: {
- selectionchange: 'onSelectionChange'
+ rowclick: 'onSelectionChange',
+ itemkeyup: 'onSelectionChange'
},
viewConfig: {
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index 2b4ff14f..120944b8 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -109,12 +109,10 @@ 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');
+ onSelectionChange: function (el, record) {
+ if (record !== undefined) {
+ this.updateButtons([record]);
+ this.fireEvent('selectdevice', record, true);
}
},