diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/app/view/CommandDialog.js | 13 | ||||
-rw-r--r-- | web/app/view/CommandDialogController.js | 10 | ||||
-rw-r--r-- | web/l10n/de.json | 1 | ||||
-rw-r--r-- | web/l10n/en.json | 1 |
4 files changed, 25 insertions, 0 deletions
diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js index cb6fed2..1450dc2 100644 --- a/web/app/view/CommandDialog.js +++ b/web/app/view/CommandDialog.js @@ -104,6 +104,19 @@ Ext.define('Traccar.view.CommandDialog', { maxValue: +14 }] }, { + xtype: 'fieldcontainer', + reference: 'paramSetHearts', + name: 'attributes', + hidden: true, + + items: [{ + xtype: 'numberfield', + fieldLabel: Strings.commandHearts, + name: 'hearts', + minValue: 0, + maxValue: 99 + }] + }, { xtype: 'textfield', reference: 'paramCustom', fieldLabel: Strings.commandCustom, diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js index ca50361..c719b5e 100644 --- a/web/app/view/CommandDialogController.js +++ b/web/app/view/CommandDialogController.js @@ -30,6 +30,8 @@ Ext.define('Traccar.view.CommandDialogController', { selected.getValue() !== 'sendSms'); this.lookupReference('paramSetTimezone').setHidden( selected.getValue() !== 'setTimezone'); + this.lookupReference('paramSetHearts').setHidden( + selected.getValue() !== 'setHearts'); this.lookupReference('paramCustom').setHidden( selected.getValue() !== 'custom'); }, @@ -88,6 +90,14 @@ Ext.define('Traccar.view.CommandDialogController', { }); } + if (record.get('type') === 'setHearts') { + attributes = this.lookupReference('paramSetHearts'); + value = attributes.down('numberfield[name="hearts"]').getValue(); + record.set('attributes', { + hearts: value + }); + } + if (record.get('type') === 'custom') { value = this.lookupReference('paramCustom').getValue(); record.set('attributes', { diff --git a/web/l10n/de.json b/web/l10n/de.json index e8c8671..c0b3653 100644 --- a/web/l10n/de.json +++ b/web/l10n/de.json @@ -145,6 +145,7 @@ "commandPhone": "Rufnummer", "commandMessage": "Nachricht", "commandTimezoneOffset": "Zeitverschiebung zu UTC", + "commandHearts": "Herzen / Blumen", "eventAll": "Alle Ereignisse", "eventDeviceOnline": "Gerät ist online", "eventDeviceOffline": "Gerät ist offline", diff --git a/web/l10n/en.json b/web/l10n/en.json index e7ff00b..23b75de 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -145,6 +145,7 @@ "commandPhone": "Phone Number", "commandMessage": "Message", "commandTimezoneOffset": "Timezone Offset to UTC", + "commandHearts": "Hearts / Flowers", "eventAll": "All Events", "eventDeviceOnline": "Device is online", "eventDeviceOffline": "Device is offline", |