aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Main.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/Main.js')
-rw-r--r--web/app/view/Main.js15
1 files changed, 3 insertions, 12 deletions
diff --git a/web/app/view/Main.js b/web/app/view/Main.js
index f656778e..2d251a5b 100644
--- a/web/app/view/Main.js
+++ b/web/app/view/Main.js
@@ -20,6 +20,7 @@ Ext.define('Traccar.view.Main', {
alias: 'widget.main',
requires: [
+ 'Traccar.view.MainController',
'Traccar.view.edit.Devices',
'Traccar.view.State',
'Traccar.view.Report',
@@ -27,18 +28,7 @@ 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);
- },
+ controller: 'mainController',
layout: 'border',
@@ -73,6 +63,7 @@ Ext.define('Traccar.view.Main', {
}, {
region: 'south',
xtype: 'reportView',
+ reference: 'reportView',
height: Traccar.Style.reportHeight,
collapsed: true,
titleCollapse: true,