aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Main.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-09 12:10:23 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-09 12:10:23 +0500
commite7aaac6c970520728bbc0d431498ffac9bb98ad7 (patch)
tree5c775834a432ac7923bc4c8e76035a733086cbc5 /web/app/view/Main.js
parent36ac724810ff77ec4070ed8f20ba7336204e384c (diff)
downloadtrackermap-web-e7aaac6c970520728bbc0d431498ffac9bb98ad7.tar.gz
trackermap-web-e7aaac6c970520728bbc0d431498ffac9bb98ad7.tar.bz2
trackermap-web-e7aaac6c970520728bbc0d431498ffac9bb98ad7.zip
Move hide logic to Main and rename attribute
Diffstat (limited to 'web/app/view/Main.js')
-rw-r--r--web/app/view/Main.js13
1 files changed, 13 insertions, 0 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: {