diff options
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/Notifications.js | 3 | ||||
-rw-r--r-- | web/app/view/ReportConfigController.js | 6 | ||||
-rw-r--r-- | web/app/view/ReportController.js | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/web/app/view/Notifications.js b/web/app/view/Notifications.js index 900ebe3f..250a6b5f 100644 --- a/web/app/view/Notifications.js +++ b/web/app/view/Notifications.js @@ -44,8 +44,7 @@ Ext.define('Traccar.view.Notifications', { text: Strings.notificationType, dataIndex: 'type', renderer: function (value) { - var typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1); - return Strings[typeKey]; + return Traccar.app.getEventString(value); } }, { text: Strings.notificationWeb, diff --git a/web/app/view/ReportConfigController.js b/web/app/view/ReportConfigController.js index c121c654..0ae7c0a4 100644 --- a/web/app/view/ReportConfigController.js +++ b/web/app/view/ReportConfigController.js @@ -35,13 +35,11 @@ Ext.define('Traccar.view.ReportConfigController', { Ext.create('Traccar.store.AllNotifications').load({ scope: this, callback: function (records, operation, success) { - var i, value, name, typeKey; + var i, value; if (success) { for (i = 0; i < records.length; i++) { value = records[i].get('type'); - typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1); - name = Strings[typeKey]; - store.add({type: value, name: name}); + store.add({type: value, name: Traccar.app.getEventString(value)}); } } } diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js index 775394d0..46543ba1 100644 --- a/web/app/view/ReportController.js +++ b/web/app/view/ReportController.js @@ -272,8 +272,7 @@ Ext.define('Traccar.view.ReportController', { text: Strings.sharedType, dataIndex: 'type', renderer: function (value) { - var typeKey = 'event' + value.charAt(0).toUpperCase() + value.slice(1); - return Strings[typeKey]; + return Traccar.app.getEventString(value); } }, { text: Strings.sharedGeofence, |