aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-25 17:30:05 +0400
committerGitHub <noreply@github.com>2018-10-25 17:30:05 +0400
commit78ebdd29d64d2ecabb2caee3937901835f683f4a (patch)
tree58a555acabc9eb11d99904766fce572a68909b66 /web/app
parent4bc1650ebe680520c9fc95b1c627fe5b7b8fa22c (diff)
parentf953873700235a416f69eeed909cd73c59e1f32b (diff)
downloadtrackermap-web-78ebdd29d64d2ecabb2caee3937901835f683f4a.tar.gz
trackermap-web-78ebdd29d64d2ecabb2caee3937901835f683f4a.tar.bz2
trackermap-web-78ebdd29d64d2ecabb2caee3937901835f683f4a.zip
Merge pull request #709 from alex-petkevich/master
Fix bug with selecting device second time from the devices grid
Diffstat (limited to 'web/app')
-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);
}
},