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 | |
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')
-rw-r--r-- | web/app/view/CommandDialog.js | 2 | ||||
-rw-r--r-- | web/app/view/DevicesController.js | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js index 66cd190ea..d23b50d4c 100644 --- a/web/app/view/CommandDialog.js +++ b/web/app/view/CommandDialog.js @@ -32,7 +32,7 @@ Ext.define('Traccar.view.CommandDialog', { fieldLabel: Strings.commandType, store: 'CommandTypes', displayField: 'name', - valueField: 'key', + valueField: 'type', listeners: { select: 'onSelect' } 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(); }, |