From 939a75a9378328bd6acae260e745d44f031d5ff0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 6 Nov 2016 09:24:13 +1300 Subject: Fix the problem with dialog height --- web/app/view/BaseDialog.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/app/view/BaseDialog.js b/web/app/view/BaseDialog.js index 273b620d..75263485 100644 --- a/web/app/view/BaseDialog.js +++ b/web/app/view/BaseDialog.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,6 +21,12 @@ Ext.define('Traccar.view.BaseDialog', { bodyPadding: Traccar.Style.normalPadding, resizable: false, modal: true, - maxHeight: window.innerHeight ? window.innerHeight - Traccar.Style.normalPadding * 2 : null, - autoScroll: true + autoScroll: true, + + initComponent: function () { + if (window.innerHeight) { + this.maxHeight = window.innerHeight - Traccar.Style.normalPadding * 2; + } + this.callParent(); + } }); -- cgit v1.2.3