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 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web/app/view/BaseWindow.js') 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(); + } }); -- cgit v1.2.3