Fix Bug 38257

This commit is contained in:
Julia Radzhabova 2018-07-24 15:29:53 +03:00
parent dfe77fd723
commit 244986f25e

View file

@ -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([
'</div>',
'<% } %>',
'<% } else { %>',
'<div style="display: inline-block; margin-bottom:15px;margin-right: 10px;">',
'<div style="<% if (!!preview && type == Asc.c_oAscAdvancedOptionsID.CSV) { %>width: 230px;margin-right: 10px;display: inline-block;<% } else { %>width: 100%;<% } %>margin-bottom:15px;">',
'<label class="header">' + t.txtEncoding + '</label>',
'<div>',
'<div id="id-codepages-combo" class="input-group-nr" style="display: inline-block; vertical-align: middle;"></div>',
'<div id="id-codepages-combo" class="input-group-nr" style="width: 100%; display: inline-block; vertical-align: middle;"></div>',
'</div>',
'</div>',
'<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
@ -257,16 +267,16 @@ define([
_.template([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<div style="display: inline-block;"><%= item.displayValue %></div>',
'<label style="text-align: right;width:' + lcid_width + 'px;"><%= item.lcid %></label>',
'<div style="display: inline-block;"><%= item.displayValue %></div>',
'<label style="text-align: right;width:' + lcid_width + 'px;"><%= item.lcid %></label>',
'</a></li>',
'<% }); %>'
].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) {