aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/dialog
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-09-14 09:38:14 +0500
committerAbyss777 <abyss@fox5.ru>2017-09-14 09:38:14 +0500
commitbe47d612285d484e2d0a2aa43174fb8e36acd816 (patch)
tree311da517ca347969c290b06285b4451fdfc6e98b /web/app/view/dialog
parenta5d36c62facad98c409b9fcd4f8b92c3d47601ab (diff)
downloadetbsa-traccar-web-be47d612285d484e2d0a2aa43174fb8e36acd816.tar.gz
etbsa-traccar-web-be47d612285d484e2d0a2aa43174fb8e36acd816.tar.bz2
etbsa-traccar-web-be47d612285d484e2d0a2aa43174fb8e36acd816.zip
Improve command type formatting
Diffstat (limited to 'web/app/view/dialog')
-rw-r--r--web/app/view/dialog/BaseEditController.js2
-rw-r--r--web/app/view/dialog/SendCommand.js2
-rw-r--r--web/app/view/dialog/SendCommandController.js9
3 files changed, 8 insertions, 5 deletions
diff --git a/web/app/view/dialog/BaseEditController.js b/web/app/view/dialog/BaseEditController.js
index f58b6cb..91379e2 100644
--- a/web/app/view/dialog/BaseEditController.js
+++ b/web/app/view/dialog/BaseEditController.js
@@ -43,7 +43,7 @@ Ext.define('Traccar.view.dialog.BaseEditController', {
} else {
record.save();
}
- button.up('window').close();
+ this.closeView();
},
showAttributesView: function (button) {
diff --git a/web/app/view/dialog/SendCommand.js b/web/app/view/dialog/SendCommand.js
index 0bb7d61..f4224be 100644
--- a/web/app/view/dialog/SendCommand.js
+++ b/web/app/view/dialog/SendCommand.js
@@ -29,7 +29,7 @@ Ext.define('Traccar.view.dialog.SendCommand', {
items: [{
xtype: 'combobox',
reference: 'commandsComboBox',
- fieldLabel: Strings.sharedSavedCommand,
+ fieldLabel: Strings.deviceCommand,
displayField: 'description',
valueField: 'id',
store: 'DeviceCommands',
diff --git a/web/app/view/dialog/SendCommandController.js b/web/app/view/dialog/SendCommandController.js
index 3bd2ad4..0e9442a 100644
--- a/web/app/view/dialog/SendCommandController.js
+++ b/web/app/view/dialog/SendCommandController.js
@@ -36,9 +36,7 @@ Ext.define('Traccar.view.dialog.SendCommandController', {
Ext.Ajax.request({
scope: this,
url: 'api/commands/send',
- jsonData: record.getData({
- persist: true
- }),
+ jsonData: record.getData(),
callback: this.onSendResult
});
},
@@ -89,5 +87,10 @@ Ext.define('Traccar.view.dialog.SendCommandController', {
} else {
Traccar.app.showError(response);
}
+ },
+
+ closeView: function () {
+ this.lookupReference('commandsComboBox').getStore().removeAll();
+ this.callParent(arguments);
}
});