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, var t = this,
_options = {}; _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, { _.extend(_options, {
closable : false, closable : false,
preview : options.preview, preview : options.preview,
warning : options.warning, warning : options.warning,
width : (options.preview) ? 414 : ((options.type == Asc.c_oAscAdvancedOptionsID.DRM && options.warning) ? 370 : 262), width : width,
height : (options.preview) ? 277 : ((options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : (options.warning ? 187 : 147)), height : height,
header : true, header : true,
cls : 'open-dlg', cls : 'open-dlg',
contentTemplate : '', contentTemplate : '',
@ -85,10 +95,10 @@ define([
'</div>', '</div>',
'<% } %>', '<% } %>',
'<% } else { %>', '<% } 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>', '<label class="header">' + t.txtEncoding + '</label>',
'<div>', '<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>',
'</div>', '</div>',
'<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>', '<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
@ -257,16 +267,16 @@ define([
_.template([ _.template([
'<% _.each(items, function(item) { %>', '<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">', '<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<div style="display: inline-block;"><%= item.displayValue %></div>', '<div style="display: inline-block;"><%= item.displayValue %></div>',
'<label style="text-align: right;width:' + lcid_width + 'px;"><%= item.lcid %></label>', '<label style="text-align: right;width:' + lcid_width + 'px;"><%= item.lcid %></label>',
'</a></li>', '</a></li>',
'<% }); %>' '<% }); %>'
].join('')); ].join(''));
this.cmbEncoding = new Common.UI.ComboBox({ this.cmbEncoding = new Common.UI.ComboBox({
el: $('#id-codepages-combo', this.$window), el: $('#id-codepages-combo', this.$window),
style: 'width: 230px;', style: 'width: 100%;',
menuStyle: 'min-width: 230px; max-height: 200px;', menuStyle: 'min-width: 100%; max-height: 200px;',
cls: 'input-group-nr', cls: 'input-group-nr',
menuCls: 'scrollable-menu', menuCls: 'scrollable-menu',
data: listItems, data: listItems,
@ -284,7 +294,7 @@ define([
var ul = this.cmbEncoding.cmpEl.find('ul'), var ul = this.cmbEncoding.cmpEl.find('ul'),
a = ul.find('li:nth(0) a'), a = ul.find('li:nth(0) a'),
width = ul.width() - parseInt(a.css('padding-left')) - parseInt(a.css('padding-right')) - 50; 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) { if (this.type == Asc.c_oAscAdvancedOptionsID.CSV) {