aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-27 22:22:08 +0200
committerGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-27 22:34:17 +0200
commitbf68718e05f811ffeb2b4b57acab56dca3e7de56 (patch)
tree5853e81ae5d08e996d1600504027c7a870202643 /web/app/view
parent44f026f881efa6207ab79fb5bada20ab67f018a0 (diff)
downloadtrackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.tar.gz
trackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.tar.bz2
trackermap-server-bf68718e05f811ffeb2b4b57acab56dca3e7de56.zip
Command framework ugly hack version
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/CommandDialog.js2
-rw-r--r--web/app/view/DevicesController.js7
2 files changed, 6 insertions, 3 deletions
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js
index 66cd190ea..e24105699 100644
--- a/web/app/view/CommandDialog.js
+++ b/web/app/view/CommandDialog.js
@@ -30,7 +30,7 @@ Ext.define('Traccar.view.CommandDialog', {
xtype: 'combobox',
name: 'type',
fieldLabel: Strings.commandType,
- store: 'CommandTypes',
+ store: 'SupportedCommands',
displayField: 'name',
valueField: 'key',
listeners: {
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();
},