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.js15
2 files changed, 9 insertions, 9 deletions
diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js
index dfa855c8..21fdb32a 100644
--- a/web/app/view/edit/Devices.js
+++ b/web/app/view/edit/Devices.js
@@ -75,8 +75,7 @@ Ext.define('Traccar.view.edit.Devices', {
},
listeners: {
- rowclick: 'onSelectionChange',
- itemkeyup: 'onSelectionChange'
+ selectionchange: 'onSelectionChange'
},
viewConfig: {
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index 120944b8..16e54b21 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -35,7 +35,8 @@ Ext.define('Traccar.view.edit.DevicesController', {
listen: {
controller: {
'*': {
- selectreport: 'selectReport'
+ selectreport: 'deselectDevice',
+ selectevent: 'deselectDevice'
},
'root': {
selectdevice: 'selectDevice'
@@ -109,10 +110,10 @@ Ext.define('Traccar.view.edit.DevicesController', {
this.lookupReference('deviceCommandButton').setDisabled(empty || readonly);
},
- onSelectionChange: function (el, record) {
- if (record !== undefined) {
- this.updateButtons([record]);
- this.fireEvent('selectdevice', record, true);
+ onSelectionChange: function (el, records) {
+ if (records && records.length) {
+ this.updateButtons(records);
+ this.fireEvent('selectdevice', records[0], true);
}
},
@@ -122,8 +123,8 @@ Ext.define('Traccar.view.edit.DevicesController', {
this.getView().getView().focusRow(device);
},
- selectReport: function (position) {
- if (position !== undefined) {
+ deselectDevice: function (object) {
+ if (object) {
this.deselectFeature();
}
},