aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 00:52:37 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-11-05 00:52:37 +1300
commite4d8fb584dbafce24baed04c7034891c19f839c1 (patch)
treeba83a5ad0b0051e55bfcf2b082f57fdcfb1ff435
parent129363f54e62fa3db041a839fe90a5b104ba881f (diff)
downloadetbsa-traccar-web-e4d8fb584dbafce24baed04c7034891c19f839c1.tar.gz
etbsa-traccar-web-e4d8fb584dbafce24baed04c7034891c19f839c1.tar.bz2
etbsa-traccar-web-e4d8fb584dbafce24baed04c7034891c19f839c1.zip
Maximize window if it doesn't fit
-rw-r--r--web/app/view/BaseWindow.js10
-rw-r--r--web/app/view/Users.js12
2 files changed, 16 insertions, 6 deletions
diff --git a/web/app/view/BaseWindow.js b/web/app/view/BaseWindow.js
index ede69b9..689f205 100644
--- a/web/app/view/BaseWindow.js
+++ b/web/app/view/BaseWindow.js
@@ -21,5 +21,13 @@ Ext.define('Traccar.view.BaseWindow', {
width: Traccar.Style.windowWidth,
height: Traccar.Style.windowHeight,
layout: 'fit',
- modal: true
+ modal: true,
+
+ initComponent: function () {
+ if (screen.width < Traccar.Style.windowWidth || screen.height < Traccar.Style.windowHeight) {
+ this.maximized = true;
+ this.style = 'border-width: 0';
+ }
+ this.callParent();
+ }
});
diff --git a/web/app/view/Users.js b/web/app/view/Users.js
index 7a505dd..5f52d0e 100644
--- a/web/app/view/Users.js
+++ b/web/app/view/Users.js
@@ -32,6 +32,13 @@ Ext.define('Traccar.view.Users', {
tbar: {
xtype: 'editToolbar',
items: [{
+ disabled: true,
+ handler: 'onGeofencesClick',
+ reference: 'userGeofencesButton',
+ glyph: 'xf21d@FontAwesome',
+ tooltip: Strings.sharedGeofences,
+ tooltipType: 'title'
+ }, {
text: Strings.deviceTitle,
disabled: true,
handler: 'onDevicesClick',
@@ -42,11 +49,6 @@ Ext.define('Traccar.view.Users', {
handler: 'onGroupsClick',
reference: 'userGroupsButton'
}, {
- text: Strings.sharedGeofences,
- disabled: true,
- handler: 'onGeofencesClick',
- reference: 'userGeofencesButton'
- }, {
text: Strings.sharedNotifications,
disabled: true,
handler: 'onNotificationsClick',