aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/view/edit/Devices.js3
-rw-r--r--web/app/view/edit/DevicesController.js7
2 files changed, 9 insertions, 1 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index 21fdb32a..2b2a874b 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'
+ selectionchange: 'onSelectionChange',
+ rowclick: 'onClick'
},
viewConfig: {
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index 2b4ff14f..c1e46b79 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -118,6 +118,13 @@ Ext.define('Traccar.view.edit.DevicesController', {
}
},
+ onClick: function (el, record) {
+ if (record !== undefined) {
+ this.updateButtons([record]);
+ this.fireEvent('selectdevice', record, true);
+ }
+ },
+
selectDevice: function (device) {
this.getView().getSelectionModel().select([device], false, true);
this.updateButtons(this.getView().getSelectionModel().getSelected().items);