From bf68718e05f811ffeb2b4b57acab56dca3e7de56 Mon Sep 17 00:00:00 2001 From: Gábor Somogyi Date: Wed, 27 Apr 2016 22:22:08 +0200 Subject: Command framework ugly hack version --- web/app/view/DevicesController.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'web/app/view/DevicesController.js') 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(); }, -- cgit v1.2.3