diff options
author | Abyss777 <abyss@fox5.ru> | 2017-08-09 12:10:23 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-08-09 12:10:23 +0500 |
commit | e7aaac6c970520728bbc0d431498ffac9bb98ad7 (patch) | |
tree | 5c775834a432ac7923bc4c8e76035a733086cbc5 /web/app/view | |
parent | 36ac724810ff77ec4070ed8f20ba7336204e384c (diff) | |
download | trackermap-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')
-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()); }, |