diff options
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/Main.js | 13 | ||||
-rw-r--r-- | web/app/view/map/MapController.js | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/web/app/view/Main.js b/web/app/view/Main.js index 3f7cf7c1..f656778e 100644 --- a/web/app/view/Main.js +++ b/web/app/view/Main.js @@ -27,6 +27,19 @@ Ext.define('Traccar.view.Main', { 'Traccar.view.map.Map' ], + initComponent: function () { + var i; + if (Traccar.app.getAttributePreference('ui.disableReport', false).toString() === 'true') { + for (i = 0; i < this.items.length; i++) { + if (this.items[i].xtype === 'reportView') { + this.items[i].hidden = true; + break; + } + } + } + this.callParent(arguments); + }, + layout: 'border', defaults: { diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index 39cf5101..f2a561a3 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -45,7 +45,7 @@ Ext.define('Traccar.view.map.MapController', { init: function () { this.callParent(); this.lookupReference('showReportsButton').setVisible(Traccar.app.isMobile() && - !Traccar.app.getAttributePreference('web.disableReport', false)); + !Traccar.app.getAttributePreference('ui.disableReport', false)); this.lookupReference('showEventsButton').setVisible(Traccar.app.isMobile()); }, |