From c0c6a032798ccd4272cc4ad0ec22f5b66ec601fa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 4 Apr 2022 21:10:04 +0300 Subject: [PATCH] Fix ole editor resizing --- .../common/main/lib/view/ExternalOleEditor.js | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/common/main/lib/view/ExternalOleEditor.js b/apps/common/main/lib/view/ExternalOleEditor.js index 13643cf6d..89b98d965 100644 --- a/apps/common/main/lib/view/ExternalOleEditor.js +++ b/apps/common/main/lib/view/ExternalOleEditor.js @@ -51,7 +51,7 @@ define([ width: 910, height: (_inner_height - 700)<0 ? _inner_height : 700, minwidth: 355, - minheight: 280, + minheight: 275, cls: 'advanced-settings-dlg', header: true, toolclose: 'hide', @@ -59,8 +59,10 @@ define([ resizable: true }, options); + this._headerFooterHeight = 85; + this.template = [ - '
', + '
', '
', '
', '
', @@ -80,7 +82,6 @@ define([ render: function() { Common.UI.Window.prototype.render.call(this); - this._headerFooterHeight = 85 + ((parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width')))); this.boxEl = this.$window.find('.body > .box'); this.btnSave = new Common.UI.Button({ @@ -144,7 +145,7 @@ define([ var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0; this.$window.find('> .body').css('height', height-header_height); - this.$window.find('> .body > .box').css('height', height-85); + this.$window.find('> .body > .box').css('height', height-this._headerFooterHeight); } }, @@ -161,20 +162,22 @@ 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'))), - bordersOffset = this.bordersOffset*2; + paddings = (parseInt(this.boxEl.css('padding-left')) + parseInt(this.boxEl.css('padding-right'))); height += 90; // add toolbar and statusbar height - if (maxHeight - bordersOffset