From 61a1f877e9f46508fd4bf74d4c33bfd3888fcf41 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 23 Jun 2017 19:56:46 +0300 Subject: [PATCH] Plugins: set maximum size of the plugins dialog. --- apps/common/main/lib/view/Plugins.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index 3ce4babd8..ed0c02fe6 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -296,9 +296,10 @@ define([ var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34; if (!_options.header) header_footer -= 34; - _options.width = (Common.Utils.innerWidth()-_options.width)<0 ? Common.Utils.innerWidth(): _options.width, + this.bordersOffset = (_options.header) ? 10 : 25; + _options.width = (Common.Utils.innerWidth()-this.bordersOffset-_options.width)<0 ? Common.Utils.innerWidth()-this.bordersOffset: _options.width; _options.height += header_footer; - _options.height = (Common.Utils.innerHeight()-_options.height)<0 ? Common.Utils.innerHeight(): _options.height; + _options.height = (Common.Utils.innerHeight()-this.bordersOffset-_options.height)<0 ? Common.Utils.innerHeight()-this.bordersOffset: _options.height; _options.cls += ' advanced-settings-dlg'; this.template = [ @@ -367,10 +368,10 @@ define([ var maxHeight = Common.Utils.innerHeight(), maxWidth = Common.Utils.innerWidth(), borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))); - if (maxHeight