diff options
author | Abyss777 <abyss@fox5.ru> | 2017-08-09 14:52:46 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-08-09 14:53:03 +0500 |
commit | df4d20d9e31193d73d001795ee4de5d6270b4abb (patch) | |
tree | 73fb6011e094883ee4108e378a1a3890054e90d5 /web/app/view/Main.js | |
parent | e7aaac6c970520728bbc0d431498ffac9bb98ad7 (diff) | |
download | trackermap-web-df4d20d9e31193d73d001795ee4de5d6270b4abb.tar.gz trackermap-web-df4d20d9e31193d73d001795ee4de5d6270b4abb.tar.bz2 trackermap-web-df4d20d9e31193d73d001795ee4de5d6270b4abb.zip |
Move logic to controller
Diffstat (limited to 'web/app/view/Main.js')
-rw-r--r-- | web/app/view/Main.js | 15 |
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, |