aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authoralex-petkevich <a@homesite.by>2018-10-25 11:09:23 +0300
committeralex-petkevich <a@homesite.by>2018-10-25 11:09:23 +0300
commit3df9db8f0a841e5f1020d6797083c73cc68e512c (patch)
tree0acfbf23eb1eec956be175edf4d53878c7210755 /web/app/view
parent4bc1650ebe680520c9fc95b1c627fe5b7b8fa22c (diff)
downloadetbsa-traccar-web-3df9db8f0a841e5f1020d6797083c73cc68e512c.tar.gz
etbsa-traccar-web-3df9db8f0a841e5f1020d6797083c73cc68e512c.tar.bz2
etbsa-traccar-web-3df9db8f0a841e5f1020d6797083c73cc68e512c.zip
Fix bug with selecting device second times from the devices grid
Diffstat (limited to 'web/app/view')
-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 21fdb32..2b2a874 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 2b4ff14..c1e46b7 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);