aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/DevicesController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-27 12:34:24 -0800
committerGitHub <noreply@github.com>2019-02-27 12:34:24 -0800
commitecde88443393ac77b133d2682fef3885f859818e (patch)
tree9edb97a56389614132a645b03220ecdc8b5fa6b4 /web/app/view/edit/DevicesController.js
parent05b555c6c8539f35c1caf3b1f4e252146f1e7d38 (diff)
parent6dd4cb71561be3d41da3d10b810fb078f10e79b3 (diff)
downloadtrackermap-web-ecde88443393ac77b133d2682fef3885f859818e.tar.gz
trackermap-web-ecde88443393ac77b133d2682fef3885f859818e.tar.bz2
trackermap-web-ecde88443393ac77b133d2682fef3885f859818e.zip
Merge pull request #730 from iEvgeny/event2pos
Add connection between event and its state
Diffstat (limited to 'web/app/view/edit/DevicesController.js')
-rw-r--r--web/app/view/edit/DevicesController.js15
1 files changed, 8 insertions, 7 deletions
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();
}
},