From 244986f25eebf444a2505fa5b091019d70468231 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 24 Jul 2018 15:29:53 +0300 Subject: [PATCH] Fix Bug 38257 --- apps/common/main/lib/view/OpenDialog.js | 28 +++++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 1157b7184..f70e6defd 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -53,12 +53,22 @@ define([ var t = this, _options = {}; + var width, height; + + if (options.preview) { + width = 414; + height = 277; + } else { + width = (options.type !== Asc.c_oAscAdvancedOptionsID.DRM) ? 340 : (options.warning ? 370 : 262); + height = (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : (options.warning ? 187 : 147); + } + _.extend(_options, { closable : false, preview : options.preview, warning : options.warning, - width : (options.preview) ? 414 : ((options.type == Asc.c_oAscAdvancedOptionsID.DRM && options.warning) ? 370 : 262), - height : (options.preview) ? 277 : ((options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : (options.warning ? 187 : 147)), + width : width, + height : height, header : true, cls : 'open-dlg', contentTemplate : '', @@ -85,10 +95,10 @@ define([ '', '<% } %>', '<% } else { %>', - '
', + '
', '', '
', - '
', + '
', '
', '
', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>', @@ -257,16 +267,16 @@ define([ _.template([ '<% _.each(items, function(item) { %>', '
  • ', - '
    <%= item.displayValue %>
    ', - '', + '
    <%= item.displayValue %>
    ', + '', '
  • ', '<% }); %>' ].join('')); this.cmbEncoding = new Common.UI.ComboBox({ el: $('#id-codepages-combo', this.$window), - style: 'width: 230px;', - menuStyle: 'min-width: 230px; max-height: 200px;', + style: 'width: 100%;', + menuStyle: 'min-width: 100%; max-height: 200px;', cls: 'input-group-nr', menuCls: 'scrollable-menu', data: listItems, @@ -284,7 +294,7 @@ define([ var ul = this.cmbEncoding.cmpEl.find('ul'), a = ul.find('li:nth(0) a'), width = ul.width() - parseInt(a.css('padding-left')) - parseInt(a.css('padding-right')) - 50; - ul.find('li div').width(width + 10); + ul.find('li div').width(width); } if (this.type == Asc.c_oAscAdvancedOptionsID.CSV) {