From c9b200ec9ee17aa494ae29af7b32b675080f819f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 2 Apr 2021 20:03:13 +0300 Subject: [PATCH] Fix alert window with 'don't show' option --- apps/common/main/lib/component/Window.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index ec1175730..d910e8497 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -473,7 +473,7 @@ define([ function autoSize(window) { var text_cnt = window.getChild('.info-box'); - var text = window.getChild('.info-box span'); + var text = window.getChild('.info-box .text > span'); var footer = window.getChild('.footer'); var header = window.getChild('.header'); var body = window.getChild('.body'); @@ -488,14 +488,14 @@ define([ options.width = options.maxwidth; } if (options.width=='auto') { - text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon_height)); + text_cnt.height(Math.max(text.height(), icon_height) + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0)); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); window.setSize(text.position().left + text.width() + parseInt(text_cnt.css('padding-right')), parseInt(body.css('height')) + parseInt(header.css('height'))); } else { text.css('white-space', 'normal'); window.setWidth(options.width); - text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon_height)); + text_cnt.height(Math.max(text.height(), icon_height) + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0)); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); window.setHeight(parseInt(body.css('height')) + parseInt(header.css('height'))); }