From e4d8fb584dbafce24baed04c7034891c19f839c1 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 5 Nov 2016 00:52:37 +1300 Subject: Maximize window if it doesn't fit --- web/app/view/BaseWindow.js | 10 +++++++++- web/app/view/Users.js | 12 +++++++----- 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', @@ -41,11 +48,6 @@ Ext.define('Traccar.view.Users', { disabled: true, handler: 'onGroupsClick', reference: 'userGroupsButton' - }, { - text: Strings.sharedGeofences, - disabled: true, - handler: 'onGeofencesClick', - reference: 'userGeofencesButton' }, { text: Strings.sharedNotifications, disabled: true, -- cgit v1.2.3