diff options
-rw-r--r-- | web/app/view/DevicesController.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index e9a075ffc..1d4e3212f 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -30,10 +30,22 @@ Ext.define('Traccar.view.DevicesController', { selectDevice: 'selectDevice', selectReport: 'selectReport' } + }, + store: { + '#Groups': { + update: 'reloadList' + }, + '#Devices': { + add: 'reloadList' + } } } }, + reloadList: function() { + Ext.getStore('Devices').reload(); + }, + init: function () { var readonly = Traccar.app.getServer().get('readonly') && !Traccar.app.getUser().get('admin'); this.lookupReference('toolbarAddButton').setVisible(!readonly); |