Fix Bug 57974
This commit is contained in:
parent
634c0b6895
commit
e5b7031495
|
@ -214,7 +214,7 @@
|
||||||
padding: 12px 10px 7px 0;
|
padding: 12px 10px 7px 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
z-index:999;
|
z-index:999;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
.compactwidth {
|
.compactwidth {
|
||||||
.btn-group, .btn-toolbar {
|
.btn-group, .btn-toolbar {
|
||||||
&.x-huge {
|
&.x-huge {
|
||||||
|
|
|
@ -1515,11 +1515,17 @@ define([
|
||||||
menu.menuAlignEl = cmp.cmpEl;
|
menu.menuAlignEl = cmp.cmpEl;
|
||||||
|
|
||||||
menu.menuAlign = 'tl-tl';
|
menu.menuAlign = 'tl-tl';
|
||||||
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - columnCount * (itemMargin + _width) - 1;
|
var menuWidth = columnCount * (itemMargin + _width),
|
||||||
|
buttonOffsetLeft = cmp.openButton.$el.offset().left;
|
||||||
|
// if (menuWidth>buttonOffsetLeft)
|
||||||
|
// menuWidth = Math.max(Math.floor(buttonOffsetLeft/(itemMargin + _width)), 2) * (itemMargin + _width);
|
||||||
|
if (menuWidth>Common.Utils.innerWidth())
|
||||||
|
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + _width)), 2) * (itemMargin + _width);
|
||||||
|
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
|
||||||
menu.setOffset(Math.min(offset, 0));
|
menu.setOffset(Math.min(offset, 0));
|
||||||
|
|
||||||
menu.cmpEl.css({
|
menu.cmpEl.css({
|
||||||
'width': columnCount * (_width + itemMargin),
|
'width': menuWidth,
|
||||||
'min-height': cmp.cmpEl.height()
|
'min-height': cmp.cmpEl.height()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1088,11 +1088,17 @@ define([
|
||||||
menu.menuAlignEl = cmp.cmpEl;
|
menu.menuAlignEl = cmp.cmpEl;
|
||||||
|
|
||||||
menu.menuAlign = 'tl-tl';
|
menu.menuAlign = 'tl-tl';
|
||||||
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - columnCount * (itemMargin + itemWidth) - 1;
|
var menuWidth = columnCount * (itemMargin + itemWidth),
|
||||||
|
buttonOffsetLeft = cmp.openButton.$el.offset().left;
|
||||||
|
// if (menuWidth>buttonOffsetLeft)
|
||||||
|
// menuWidth = Math.max(Math.floor(buttonOffsetLeft/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
|
||||||
|
if (menuWidth>Common.Utils.innerWidth())
|
||||||
|
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
|
||||||
|
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
|
||||||
menu.setOffset(Math.min(offset, 0));
|
menu.setOffset(Math.min(offset, 0));
|
||||||
|
|
||||||
menu.cmpEl.css({
|
menu.cmpEl.css({
|
||||||
'width': columnCount * (itemWidth + itemMargin),
|
'width': menuWidth,
|
||||||
'min-height': cmp.cmpEl.height()
|
'min-height': cmp.cmpEl.height()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,6 @@ define([
|
||||||
'<span class="btn-slot text" id="slot-chk-header-column"></span>' +
|
'<span class="btn-slot text" id="slot-chk-header-column"></span>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="separator long invisible"></div>' +
|
|
||||||
'<div class="group small">' +
|
'<div class="group small">' +
|
||||||
'<div class="elset">' +
|
'<div class="elset">' +
|
||||||
'<span class="btn-slot text" id="slot-chk-banded-row"></span>' +
|
'<span class="btn-slot text" id="slot-chk-banded-row"></span>' +
|
||||||
|
@ -88,7 +87,6 @@ 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="separator long invisible"></div>' +
|
|
||||||
'<div class="group flex small" id="slot-field-pivot-styles" style="width: 324px;max-width: 324px;min-width: 105px;" data-group-width="324px">' +
|
'<div class="group flex small" id="slot-field-pivot-styles" style="width: 324px;max-width: 324px;min-width: 105px;" data-group-width="324px">' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</section>';
|
'</section>';
|
||||||
|
@ -281,10 +279,29 @@ define([
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock, _set['FormatCells'], _set['PivotTables']],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock, _set['FormatCells'], _set['PivotTables']],
|
||||||
beforeOpenHandler: function(e) {
|
beforeOpenHandler: function(e) {
|
||||||
var cmp = this,
|
var cmp = this,
|
||||||
menu = cmp.openButton.menu;
|
menu = cmp.openButton.menu,
|
||||||
|
columnCount = 4;
|
||||||
|
|
||||||
if (menu.cmpEl) {
|
if (menu.cmpEl) {
|
||||||
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - menu.cmpEl.outerWidth() - 1;
|
var itemEl = $(cmp.cmpEl.find('.dataview.inner .style').get(0)).parent();
|
||||||
|
var itemMargin = 8;
|
||||||
|
var itemWidth = itemEl.is(':visible') ? parseFloat(itemEl.css('width')) :
|
||||||
|
(cmp.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) +
|
||||||
|
parseFloat(itemEl.css('border-left-width')) + parseFloat(itemEl.css('border-right-width')));
|
||||||
|
|
||||||
|
menu.menuAlignEl = cmp.cmpEl;
|
||||||
|
menu.menuAlign = 'tl-tl';
|
||||||
|
var menuWidth = columnCount * (itemMargin + itemWidth) + 17, // for scroller
|
||||||
|
buttonOffsetLeft = cmp.openButton.$el.offset().left;
|
||||||
|
if (menuWidth>Common.Utils.innerWidth())
|
||||||
|
menuWidth = Math.max(Math.floor((Common.Utils.innerWidth()-17)/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth) + 17;
|
||||||
|
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
|
||||||
menu.setOffset(Math.min(offset, 0));
|
menu.setOffset(Math.min(offset, 0));
|
||||||
|
|
||||||
|
menu.cmpEl.css({
|
||||||
|
'width': menuWidth,
|
||||||
|
'min-height': cmp.cmpEl.height()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
|
@ -375,10 +392,6 @@ define([
|
||||||
this.btnPivotSubtotals.render(this.$el.find('#slot-btn-pivot-subtotals'));
|
this.btnPivotSubtotals.render(this.$el.find('#slot-btn-pivot-subtotals'));
|
||||||
this.btnPivotGrandTotals.render(this.$el.find('#slot-btn-pivot-grand-totals'));
|
this.btnPivotGrandTotals.render(this.$el.find('#slot-btn-pivot-grand-totals'));
|
||||||
this.pivotStyles.render(this.$el.find('#slot-field-pivot-styles'));
|
this.pivotStyles.render(this.$el.find('#slot-field-pivot-styles'));
|
||||||
this.pivotStyles.openButton.menu.cmpEl.css({
|
|
||||||
'min-width': 293,
|
|
||||||
'max-width': 293
|
|
||||||
});
|
|
||||||
|
|
||||||
return this.$el;
|
return this.$el;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1330,11 +1330,17 @@ define([
|
||||||
menu.menuAlignEl = cmp.cmpEl;
|
menu.menuAlignEl = cmp.cmpEl;
|
||||||
|
|
||||||
menu.menuAlign = 'tl-tl';
|
menu.menuAlign = 'tl-tl';
|
||||||
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - columnCount * (itemMargin + itemWidth) - 1;
|
var menuWidth = columnCount * (itemMargin + itemWidth),
|
||||||
|
buttonOffsetLeft = cmp.openButton.$el.offset().left;
|
||||||
|
// if (menuWidth>buttonOffsetLeft)
|
||||||
|
// menuWidth = Math.max(Math.floor(buttonOffsetLeft/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
|
||||||
|
if (menuWidth>Common.Utils.innerWidth())
|
||||||
|
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
|
||||||
|
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
|
||||||
menu.setOffset(Math.min(offset, 0));
|
menu.setOffset(Math.min(offset, 0));
|
||||||
|
|
||||||
menu.cmpEl.css({
|
menu.cmpEl.css({
|
||||||
'width' : columnCount * (itemWidth + itemMargin),
|
'width': menuWidth,
|
||||||
'min-height': cmp.cmpEl.height()
|
'min-height': cmp.cmpEl.height()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue