From d3cf54f1f77b3552b4f12fbde73463159cf1b359 Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Tue, 20 Dec 2016 11:00:21 +0100 Subject: #2702 Rename "Hearts" function to "Indicator" to be more general --- web/app/view/CommandDialog.js | 6 +++--- web/app/view/CommandDialogController.js | 12 ++++++------ web/l10n/en.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'web') diff --git a/web/app/view/CommandDialog.js b/web/app/view/CommandDialog.js index 1450dc28..ffe90951 100644 --- a/web/app/view/CommandDialog.js +++ b/web/app/view/CommandDialog.js @@ -105,14 +105,14 @@ Ext.define('Traccar.view.CommandDialog', { }] }, { xtype: 'fieldcontainer', - reference: 'paramSetHearts', + reference: 'paramSetIndicator', name: 'attributes', hidden: true, items: [{ xtype: 'numberfield', - fieldLabel: Strings.commandHearts, - name: 'hearts', + fieldLabel: Strings.commandData, + name: 'data', minValue: 0, maxValue: 99 }] diff --git a/web/app/view/CommandDialogController.js b/web/app/view/CommandDialogController.js index c719b5ee..9d7bb2ba 100644 --- a/web/app/view/CommandDialogController.js +++ b/web/app/view/CommandDialogController.js @@ -30,8 +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('paramSetIndicator').setHidden( + selected.getValue() !== 'setIndicator'); this.lookupReference('paramCustom').setHidden( selected.getValue() !== 'custom'); }, @@ -90,11 +90,11 @@ Ext.define('Traccar.view.CommandDialogController', { }); } - if (record.get('type') === 'setHearts') { - attributes = this.lookupReference('paramSetHearts'); - value = attributes.down('numberfield[name="hearts"]').getValue(); + if (record.get('type') === 'setIndicator') { + attributes = this.lookupReference('paramSetIndicator'); + value = attributes.down('numberfield[name="data"]').getValue(); record.set('attributes', { - hearts: value + data: value }); } diff --git a/web/l10n/en.json b/web/l10n/en.json index 23b75deb..b700cf47 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -145,7 +145,7 @@ "commandPhone": "Phone Number", "commandMessage": "Message", "commandTimezoneOffset": "Timezone Offset to UTC", - "commandHearts": "Hearts / Flowers", + "commandSetIndicator": "Set Indicator", "eventAll": "All Events", "eventDeviceOnline": "Device is online", "eventDeviceOffline": "Device is offline", -- cgit v1.2.3