diff options
author | Rafael Guterres <guterresrafael@gmail.com> | 2016-12-21 22:30:52 -0200 |
---|---|---|
committer | Rafael Guterres <guterresrafael@gmail.com> | 2016-12-21 22:30:52 -0200 |
commit | a23b0c9a452f8a06bc781be5c891932096fe5e65 (patch) | |
tree | f92644c27670e0c7f2f210905ee4b0e21916425c /web/app/view/CommandDialogController.js | |
parent | eb5089cffdf6a3ed5e29fcce1b525b223ce5fe05 (diff) | |
parent | 19d6e1c9cc916ed4c1ed72fe168909770a657db2 (diff) | |
download | trackermap-web-a23b0c9a452f8a06bc781be5c891932096fe5e65.tar.gz trackermap-web-a23b0c9a452f8a06bc781be5c891932096fe5e65.tar.bz2 trackermap-web-a23b0c9a452f8a06bc781be5c891932096fe5e65.zip |
Merge branch 'master' of https://github.com/tananaev/traccar-web
Diffstat (limited to 'web/app/view/CommandDialogController.js')
-rw-r--r-- | web/app/view/CommandDialogController.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js index 9442e4f4..6e809fa1 100644 --- a/web/app/view/CommandDialogController.js +++ b/web/app/view/CommandDialogController.js @@ -28,6 +28,10 @@ Ext.define('Traccar.view.CommandDialogController', { selected.getValue() !== 'sendSms' && selected.getValue() !== 'sendUssd'); this.lookupReference('paramSmsMessage').setHidden( selected.getValue() !== 'sendSms'); + this.lookupReference('paramSetTimezone').setHidden( + selected.getValue() !== 'setTimezone'); + this.lookupReference('paramSetIndicator').setHidden( + selected.getValue() !== 'setIndicator'); this.lookupReference('paramCustom').setHidden( selected.getValue() !== 'custom'); }, @@ -78,6 +82,22 @@ Ext.define('Traccar.view.CommandDialogController', { }); } + if (record.get('type') === 'setTimezone') { + attributes = this.lookupReference('paramSetTimezone'); + value = attributes.down('numberfield[name="timezone"]').getValue(); + record.set('attributes', { + timezone: value * 3600 + }); + } + + if (record.get('type') === 'setIndicator') { + attributes = this.lookupReference('paramSetIndicator'); + value = attributes.down('numberfield[name="data"]').getValue(); + record.set('attributes', { + data: value + }); + } + if (record.get('type') === 'custom') { value = this.lookupReference('paramCustom').getValue(); record.set('attributes', { |