Merge pull request #450 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-08-03 14:21:22 +03:00 committed by GitHub
commit f5c5aa7764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View file

@ -391,7 +391,8 @@ define([
if (!_flex) { if (!_flex) {
_flex = []; _flex = [];
_.each($active.find('.group.flex'), function(item) { _.each($active.find('.group.flex'), function(item) {
_flex.push($(item)); var el = $(item);
_flex.push({el: el, width: el.attr('data-group-width') || el.attr('max-width')}); //save flex element and it's initial width
}); });
data.flex = _flex; data.flex = _flex;
} }
@ -399,7 +400,7 @@ define([
if ( _rightedge > _maxright) { if ( _rightedge > _maxright) {
if (_flex.length>0) { if (_flex.length>0) {
for (var i=0; i<_flex.length; i++) { for (var i=0; i<_flex.length; i++) {
var item = _flex[i]; var item = _flex[i].el;
if (item.outerWidth() > parseInt(item.css('min-width'))) if (item.outerWidth() > parseInt(item.css('min-width')))
return; return;
else else
@ -433,7 +434,7 @@ define([
if (_flex.length>0 && $active.find('.btn-slot.compactwidth').length<1) { if (_flex.length>0 && $active.find('.btn-slot.compactwidth').length<1) {
for (var i=0; i<_flex.length; i++) { for (var i=0; i<_flex.length; i++) {
var item = _flex[i]; var item = _flex[i];
item.css('width', item.css('max-width')); item.el.css('width', item.width);
} }
} }
} }

View file

@ -281,6 +281,7 @@
.combo-template(60px); .combo-template(60px);
top: -7px; top: -7px;
padding-right: 24px;
position: absolute; position: absolute;
.view .dataview, .dropdown-menu { .view .dataview, .dropdown-menu {

View file

@ -96,7 +96,7 @@
<span class="btn-slot split" id="slot-btn-slidesize"></span> <span class="btn-slot split" id="slot-btn-slidesize"></span>
</div> </div>
</div> </div>
<div class="group flex" id="slot-field-styles" style="width: 100%; min-width: 148px; max-width: 100%;"></div> <div class="group flex" id="slot-field-styles" style="width: 100%; min-width: 148px;" data-group-width="100%"></div>
</section> </section>
<section class="panel" data-tab="ins"> <section class="panel" data-tab="ins">
<div class="group"> <div class="group">

View file

@ -87,7 +87,7 @@ define([
'<span class="btn-slot text" id="slot-chk-banded-column"></span>' + '<span class="btn-slot text" id="slot-chk-banded-column"></span>' +
'</div>' + '</div>' +
'</div>' + '</div>' +
'<div class="group flex" id="slot-field-pivot-styles" style="width: 336px;max-width: 336px;min-width: 115px;">' + '<div class="group flex" id="slot-field-pivot-styles" style="width: 336px;max-width: 336px;min-width: 115px;" data-group-width="336px">' +
'</div>' + '</div>' +
'</section>'; '</section>';

View file

@ -243,7 +243,7 @@ define([
this.numCols = new Common.UI.MetricSpinner({ this.numCols = new Common.UI.MetricSpinner({
el: $('#slicer-spin-cols'), el: $('#slicer-spin-cols'),
step: 1, step: 1,
width: 50, width: 55,
defaultUnit : "", defaultUnit : "",
defaultValue : 1, defaultValue : 1,
value: '1', value: '1',