diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2022-01-31 22:57:36 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2022-01-31 22:57:36 -0800 |
commit | 4dcb17d6d39a944cf0f1186c77b463078485edb7 (patch) | |
tree | 3871a6ebc8cf2705ab22e0e12d796ce29d9a2c40 /web/app/view | |
parent | 32792149bbffbc74fbaae85bb3a40beaf30776ef (diff) | |
download | trackermap-web-4dcb17d6d39a944cf0f1186c77b463078485edb7.tar.gz trackermap-web-4dcb17d6d39a944cf0f1186c77b463078485edb7.tar.bz2 trackermap-web-4dcb17d6d39a944cf0f1186c77b463078485edb7.zip |
Add option to disable reports
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/MainController.js | 4 | ||||
-rw-r--r-- | web/app/view/dialog/Server.js | 6 | ||||
-rw-r--r-- | web/app/view/dialog/User.js | 8 | ||||
-rw-r--r-- | web/app/view/dialog/UserController.js | 1 | ||||
-rw-r--r-- | web/app/view/map/MapController.js | 4 |
5 files changed, 19 insertions, 4 deletions
diff --git a/web/app/view/MainController.js b/web/app/view/MainController.js index 7cd03050..8ed986af 100644 --- a/web/app/view/MainController.js +++ b/web/app/view/MainController.js @@ -1,5 +1,5 @@ /* - * Copyright 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org) * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org) * * This program is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ Ext.define('Traccar.view.MainController', { alias: 'controller.mainController', init: function () { - this.lookupReference('reportView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableReport')); + this.lookupReference('reportView').setHidden(Traccar.app.getPreference('disableReports', false)); this.lookupReference('eventsView').setHidden(Traccar.app.getBooleanAttributePreference('ui.disableEvents')); } }); diff --git a/web/app/view/dialog/Server.js b/web/app/view/dialog/Server.js index d9e225ec..6ee250b6 100644 --- a/web/app/view/dialog/Server.js +++ b/web/app/view/dialog/Server.js @@ -122,6 +122,12 @@ Ext.define('Traccar.view.dialog.Server', { uncheckedValue: false, name: 'limitCommands', fieldLabel: Strings.userLimitCommands + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'disableReports', + fieldLabel: Strings.userDisableReports }] }] }, diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js index 917f110c..7335ee79 100644 --- a/web/app/view/dialog/User.js +++ b/web/app/view/dialog/User.js @@ -145,6 +145,14 @@ Ext.define('Traccar.view.dialog.User', { disabled: true, reference: 'limitCommandsField' }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'disableReports', + fieldLabel: Strings.userDisableReports, + disabled: true, + reference: 'disableReportsField' + }, { xtype: 'datefield', name: 'expirationTime', fieldLabel: Strings.userExpirationTime, diff --git a/web/app/view/dialog/UserController.js b/web/app/view/dialog/UserController.js index 7383f9ee..4ba48563 100644 --- a/web/app/view/dialog/UserController.js +++ b/web/app/view/dialog/UserController.js @@ -31,6 +31,7 @@ Ext.define('Traccar.view.dialog.UserController', { this.lookupReference('expirationTimeField').setDisabled(false); this.lookupReference('deviceReadonlyField').setDisabled(false); this.lookupReference('limitCommandsField').setDisabled(false); + this.lookupReference('disableReportsField').setDisabled(false); } }, diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index d025b586..f6d88eed 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ Ext.define('Traccar.view.map.MapController', { init: function () { this.callParent(); this.lookupReference('showReportsButton').setVisible( - Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableReport')); + Traccar.app.isMobile() && !Traccar.app.getPreference('disableReports', false)); this.lookupReference('showEventsButton').setVisible( Traccar.app.isMobile() && !Traccar.app.getBooleanAttributePreference('ui.disableEvents')); }, |