diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-09 14:47:28 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-05-09 14:47:28 +1200 |
commit | 4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82 (patch) | |
tree | e145e20169c61e12bb57f9145bc0c626add5596d /web/app/view/DevicesController.js | |
parent | 7ed27b733d442cb442a8049263fab282b39e5872 (diff) | |
parent | 301f2d314f446410da78615ac76ce0c07571d445 (diff) | |
download | trackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.tar.gz trackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.tar.bz2 trackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.zip |
Merge pull request #1920 from gaborgsomogyi/command_framework
Get supported commands from server
Diffstat (limited to 'web/app/view/DevicesController.js')
-rw-r--r-- | web/app/view/DevicesController.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index 10918c13a..9dee0ff7c 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -80,11 +80,14 @@ Ext.define('Traccar.view.DevicesController', { }, onCommandClick: function () { - var device, command, dialog; + var device, deviceId, command, dialog, comboStore; device = this.getView().getSelectionModel().getSelection()[0]; + deviceId = device.get('id'); command = Ext.create('Traccar.model.Command'); - command.set('deviceId', device.get('id')); + command.set('deviceId', deviceId); dialog = Ext.create('Traccar.view.CommandDialog'); + comboStore = dialog.down('form').down('combobox').getStore(); + comboStore.getProxy().setExtraParam('deviceId', deviceId); dialog.down('form').loadRecord(command); dialog.show(); }, |