aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-09-16 22:36:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-09-16 22:36:10 +1200
commit607522a21625610248db7a586e6285bbb0331391 (patch)
tree0453b5d5c359cfa6d4434bf7385177904e23c91c /web
parente7187ea46a8ca8a0e8d93a030a9d360249b998fa (diff)
downloadtraccar-server-607522a21625610248db7a586e6285bbb0331391.tar.gz
traccar-server-607522a21625610248db7a586e6285bbb0331391.tar.bz2
traccar-server-607522a21625610248db7a586e6285bbb0331391.zip
Clean up commands controller
Diffstat (limited to 'web')
-rw-r--r--web/app/view/command/CommandDialogController.js11
-rw-r--r--web/l10n/en.js1
2 files changed, 7 insertions, 5 deletions
diff --git a/web/app/view/command/CommandDialogController.js b/web/app/view/command/CommandDialogController.js
index 6dfb322f5..8c13ea1e1 100644
--- a/web/app/view/command/CommandDialogController.js
+++ b/web/app/view/command/CommandDialogController.js
@@ -24,14 +24,15 @@ Ext.define('Traccar.view.command.CommandDialogController', {
},
onSendClick: function(button) {
- var attributes;
- var form = button.up('window').down('form');
+ var attributes, value, record, form;
+
+ form = button.up('window').down('form');
form.updateRecord();
- var record = form.getRecord();
+ record = form.getRecord();
if (record.get('type') === 'positionPeriodic') {
attributes = this.lookupReference('paramPositionPeriodic');
- var value = attributes.down('numberfield[name="frequency"]').getValue();
+ value = attributes.down('numberfield[name="frequency"]').getValue();
value *= attributes.down('combobox[name="unit"]').getValue();
record.set('attributes', {
@@ -49,8 +50,8 @@ Ext.define('Traccar.view.command.CommandDialogController', {
onSendReturn: function(options, success, response) {
if (Traccar.ErrorManager.check(success, response)) {
+ Ext.toast(strings.commandSent);
this.closeView();
- //TODO toast Ext.toast(strings.loginCreated);
}
},
diff --git a/web/l10n/en.js b/web/l10n/en.js
index 436932a72..e69751cb3 100644
--- a/web/l10n/en.js
+++ b/web/l10n/en.js
@@ -79,6 +79,7 @@ var strings = {
commandTitle: 'Command',
commandSend: 'Send',
commandType: 'Type',
+ commandSent: 'Command has been sent',
commandPositionPeriodic: 'Periodic Reporting',
commandPositionStop: 'Stop Reporting',
commandEngineStop: 'Engine Stop',