aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorAlexander Menk <menk@mestrona.net>2016-12-19 14:53:16 +0100
committerAlexander Menk <menk@mestrona.net>2016-12-19 14:53:16 +0100
commiteea8e3cde73b7fe2640c6fe187ffb4d899381a60 (patch)
treefae95c17f9c6d46d7f0700b3eddcd8279b726045 /web/app/view
parent6b0e967b5156071c3c0ad777af96a1c7e7ebc2de (diff)
downloadtrackermap-web-eea8e3cde73b7fe2640c6fe187ffb4d899381a60.tar.gz
trackermap-web-eea8e3cde73b7fe2640c6fe187ffb4d899381a60.tar.bz2
trackermap-web-eea8e3cde73b7fe2640c6fe187ffb4d899381a60.zip
#2702 [WIP] Implement SET_TIMEZONE for watch Protocol
Problem: Positive time zone needs to be + prepended, custom formatter does not seem to be called
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/CommandDialog.js14
-rw-r--r--web/app/view/CommandDialogController.js10
2 files changed, 24 insertions, 0 deletions
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js
index af36f558..cb6fed22 100644
--- a/web/app/view/CommandDialog.js
+++ b/web/app/view/CommandDialog.js
@@ -90,6 +90,20 @@ Ext.define('Traccar.view.CommandDialog', {
hidden: true
}]
}, {
+ xtype: 'fieldcontainer',
+ reference: 'paramSetTimezone',
+ name: 'attributes',
+ hidden: true,
+
+ items: [{
+ xtype: 'numberfield',
+ fieldLabel: Strings.commandTimezoneOffset,
+ name: 'timezone',
+ minValue: -12,
+ step: 0.5,
+ maxValue: +14
+ }]
+ }, {
xtype: 'textfield',
reference: 'paramCustom',
fieldLabel: Strings.commandCustom,
diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js
index 9442e4f4..ca503613 100644
--- a/web/app/view/CommandDialogController.js
+++ b/web/app/view/CommandDialogController.js
@@ -28,6 +28,8 @@ 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('paramCustom').setHidden(
selected.getValue() !== 'custom');
},
@@ -78,6 +80,14 @@ 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
+ });
+ }
+
if (record.get('type') === 'custom') {
value = this.lookupReference('paramCustom').getValue();
record.set('attributes', {