aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller/Root.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/controller/Root.js')
-rw-r--r--web/app/controller/Root.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index d85102a..27455b3 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -103,7 +103,7 @@ Ext.define('Traccar.controller.Root', {
},
loadApp: function () {
- var attribution, eventId;
+ var attribution, eventId, main, i;
Ext.getStore('Groups').load();
Ext.getStore('Drivers').load();
Ext.getStore('Geofences').load();
@@ -124,7 +124,15 @@ Ext.define('Traccar.controller.Root', {
if (Traccar.app.isMobile()) {
Ext.create('widget.mainMobile');
} else {
- Ext.create('widget.main');
+ main = Ext.create('widget.main');
+ if (Traccar.app.getAttributePreference('web.disableReport', false)) {
+ for (i = 0; i < main.items.length; i++) {
+ if (main.items.items[i].xtype === 'reportView') {
+ main.items.items[i].hide();
+ break;
+ }
+ }
+ }
}
eventId = Ext.Object.fromQueryString(window.location.search).eventId;
if (eventId) {