diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-22 11:20:12 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-22 11:20:12 +1200 |
commit | 24c7705d7fa5aa7393dc7def4d9cd6c16ad8fc8d (patch) | |
tree | 3c174ac2f223ce40ad598e93a060acf7fdbc8295 /web | |
parent | c3eb0a64c586e2bb71494fa2054ba9cea7ec3a2e (diff) | |
download | trackermap-server-24c7705d7fa5aa7393dc7def4d9cd6c16ad8fc8d.tar.gz trackermap-server-24c7705d7fa5aa7393dc7def4d9cd6c16ad8fc8d.tar.bz2 trackermap-server-24c7705d7fa5aa7393dc7def4d9cd6c16ad8fc8d.zip |
Move main layouts to view folder
Diffstat (limited to 'web')
-rw-r--r-- | web/app/controller/Root.js | 10 | ||||
-rw-r--r-- | web/app/view/Main.js (renamed from web/app/view/main/Main.js) | 19 | ||||
-rw-r--r-- | web/app/view/MainMobile.js (renamed from web/app/view/main/MainMobile.js) | 9 |
3 files changed, 16 insertions, 22 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 9eef35dc0..9ae7fa761 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -18,10 +18,7 @@ Ext.define('Traccar.controller.Root', { extend: 'Ext.app.Controller', requires: [ - 'Traccar.LoginManager', - 'Traccar.view.login.Login', - 'Traccar.view.main.Main', - 'Traccar.view.main.MainMobile' + 'Traccar.LoginManager' ], init: function() { @@ -68,10 +65,9 @@ Ext.define('Traccar.controller.Root', { Ext.getStore('Devices').load(); Ext.getBody().empty(); if (this.isPhone) { - Ext.create('Traccar.view.main.MainMobile'); + Ext.create('Traccar.view.MainMobile'); } else { - Ext.create('Traccar.view.main.Main'); + Ext.create('Traccar.view.Main'); } } - }); diff --git a/web/app/view/main/Main.js b/web/app/view/Main.js index cb09abad2..814e5c1d5 100644 --- a/web/app/view/main/Main.js +++ b/web/app/view/Main.js @@ -14,7 +14,7 @@ * limitations under the License. */ -Ext.define('Traccar.view.main.Main', { +Ext.define('Traccar.view.Main', { extend: 'Ext.container.Viewport', requires: [ @@ -27,6 +27,7 @@ Ext.define('Traccar.view.main.Main', { layout: 'border', defaults: { + header: false, collapsible: true, split: true }, @@ -35,29 +36,27 @@ Ext.define('Traccar.view.main.Main', { region:'west', layout: 'border', width: styles.deviceWidth, - header: false, + defaults: { - split: true + split: true, + flex: 1 }, + items: [{ - collapsible: false, region: 'center', - xtype: 'deviceView', - flex: 1 + xtype: 'deviceView' }, { region: 'south', - xtype: 'stateView', - flex: 1 + xtype: 'stateView' }] }, { region: 'south', xtype: 'reportView', - header: false, height: styles.reportHeight }, { region: 'center', xtype: 'mapView', + header: true, collapsible: false }] - }); diff --git a/web/app/view/main/MainMobile.js b/web/app/view/MainMobile.js index 0fd39ed26..dc39a037c 100644 --- a/web/app/view/main/MainMobile.js +++ b/web/app/view/MainMobile.js @@ -14,7 +14,7 @@ * limitations under the License. */ -Ext.define('Traccar.view.main.MainMobile', { +Ext.define('Traccar.view.MainMobile', { extend: 'Ext.container.Viewport', requires: [ @@ -32,18 +32,17 @@ Ext.define('Traccar.view.main.MainMobile', { }, items: [{ - xtype: 'stateView', region: 'east', - collapsed:true, + xtype: 'stateView', flex: 4 }, { - xtype: 'mapView', region: 'center', + xtype: 'mapView', collapsible: false, flex: 2 }, { - xtype: 'deviceView', region: 'south', + xtype: 'deviceView', flex: 1 }] }); |