aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app/controller/Root.js10
-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
}]
});