From 0c17a3d2a9aad83456b0557cf1b87eaf4ffbb675 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Wed, 27 Feb 2019 18:35:11 +0300 Subject: Bugfix for marker selfselect --- web/app/view/edit/Devices.js | 3 +-- web/app/view/edit/DevicesController.js | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'web/app') 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 82e471c2..f4e46153 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -111,9 +111,9 @@ Ext.define('Traccar.view.edit.DevicesController', { }, onSelectionChange: function (el, record) { - if (record) { - this.updateButtons([record]); - this.fireEvent('selectdevice', record, true); + if (record && record.length) { + this.updateButtons(record); + this.fireEvent('selectdevice', record[0], true); } }, -- cgit v1.2.3