aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/store/Devices.js6
-rw-r--r--web/app/view/Devices.js1
-rw-r--r--web/app/view/DevicesController.js9
3 files changed, 9 insertions, 7 deletions
diff --git a/web/app/store/Devices.js b/web/app/store/Devices.js
index 5084ff554..8ba513792 100644
--- a/web/app/store/Devices.js
+++ b/web/app/store/Devices.js
@@ -24,11 +24,5 @@ Ext.define('Traccar.store.Devices', {
writer: {
writeAllFields: true
}
- },
- listeners : {
- update: function () {
- devicesPanel = Ext.getCmp('devicesPanel');
- devicesPanel.fireEvent('selectionchange',devicesPanel.getSelectionModel());
- }
}
});
diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js
index 31eead2f7..f06c2658b 100644
--- a/web/app/view/Devices.js
+++ b/web/app/view/Devices.js
@@ -17,7 +17,6 @@
Ext.define('Traccar.view.Devices', {
extend: 'Ext.grid.Panel',
xtype: 'devicesView',
- id: 'devicesPanel',
requires: [
'Traccar.view.DevicesController',
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js
index 8c1bba00f..0f8c5249f 100644
--- a/web/app/view/DevicesController.js
+++ b/web/app/view/DevicesController.js
@@ -30,6 +30,11 @@ Ext.define('Traccar.view.DevicesController', {
selectDevice: 'selectDevice',
selectReport: 'selectReport'
}
+ },
+ store: {
+ '*': {
+ update: 'onUpdateDevice'
+ }
}
}
},
@@ -117,5 +122,9 @@ Ext.define('Traccar.view.DevicesController', {
if (position !== undefined) {
this.getView().getSelectionModel().deselectAll();
}
+ },
+
+ onUpdateDevice: function () {
+ this.view.fireEvent('selectionchange',this.view.getSelectionModel());
}
});