aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/DevicesController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-10-19 09:31:50 +0500
committerAbyss777 <abyss@fox5.ru>2017-10-19 09:31:50 +0500
commitfa121daf1da238b0ae89e79986592b72279cb781 (patch)
tree043b912159d87047e8572a3e966a7e3355ea1775 /web/app/view/edit/DevicesController.js
parentb60127b12fa878db7aecf35109e42f57eed34fe3 (diff)
downloadetbsa-traccar-web-fa121daf1da238b0ae89e79986592b72279cb781.tar.gz
etbsa-traccar-web-fa121daf1da238b0ae89e79986592b72279cb781.tar.bz2
etbsa-traccar-web-fa121daf1da238b0ae89e79986592b72279cb781.zip
Adjusted to buffered commands
Diffstat (limited to 'web/app/view/edit/DevicesController.js')
-rw-r--r--web/app/view/edit/DevicesController.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index a4bbd4b..a0bf9dc 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -70,30 +70,29 @@ Ext.define('Traccar.view.edit.DevicesController', {
},
onCommandClick: function () {
- var device, deviceId, dialog, typesStore, online, commandsStore;
+ var device, deviceId, dialog, typesStore, commandsStore;
device = this.getView().getSelectionModel().getSelection()[0];
- online = device.get('status') === 'online';
deviceId = device.get('id');
dialog = Ext.create('Traccar.view.dialog.SendCommand');
dialog.deviceId = deviceId;
- dialog.online = online;
commandsStore = dialog.lookupReference('commandsComboBox').getStore();
commandsStore.getProxy().setExtraParam('deviceId', deviceId);
if (!Traccar.app.getPreference('limitCommands', false)) {
commandsStore.add({
id: 0,
- description: Strings.sharedNew,
- textChannel: !online
+ description: Strings.sharedNew
});
- typesStore = dialog.lookupReference('commandType').getStore();
- typesStore.getProxy().setExtraParam('deviceId', deviceId);
}
commandsStore.load({
addRecords: true
});
+ typesStore = dialog.lookupReference('commandType').getStore();
+ typesStore.getProxy().setExtraParam('deviceId', deviceId);
+ typesStore.load();
+
dialog.show();
},