commit
9350a5e089
|
@ -503,7 +503,8 @@ define([
|
|||
setMoreButton: function(tab, panel) {
|
||||
var me = this;
|
||||
if (!btnsMore[tab]) {
|
||||
var box = $('<div class="more-box" style="position: absolute;right: 0; padding-left: 12px;padding-right: 6px;display: none;">' +
|
||||
var top = panel.position().top;
|
||||
var box = $('<div class="more-box" style="position: absolute;right: 0; top:'+ top +'px; padding-left: 12px;padding-right: 6px;display: none;">' +
|
||||
'<div class="separator long" style="position: relative;display: table-cell;"></div>' +
|
||||
'<div class="group" style=""><span class="btn-slot text x-huge slot-btn-more"></span></div>' +
|
||||
'</div>');
|
||||
|
@ -561,7 +562,7 @@ define([
|
|||
var need_break = false;
|
||||
for (var i=items.length-1; i>=0; i--) {
|
||||
var item = $(items[i]);
|
||||
if (!item.is(':visible')) { // move invisible items as is and set special attr
|
||||
if (!item.is(':visible') && !item.attr('hidden-on-resize')) { // move invisible items as is and set special attr
|
||||
item.attr('data-hidden-tb-item', true);
|
||||
this.$moreBar.prepend(item);
|
||||
hideAllMenus = true;
|
||||
|
@ -585,6 +586,7 @@ define([
|
|||
this.$moreBar.prepend(item);
|
||||
if (last_separator) {
|
||||
last_separator.css('display', '');
|
||||
last_separator.removeAttr('hidden-on-resize');
|
||||
}
|
||||
hideAllMenus = true;
|
||||
} else if ( offset.left+item_width > _maxright ) {
|
||||
|
@ -595,6 +597,7 @@ define([
|
|||
this.$moreBar.prepend(item);
|
||||
if (last_separator) {
|
||||
last_separator.css('display', '');
|
||||
last_separator.removeAttr('hidden-on-resize');
|
||||
}
|
||||
hideAllMenus = true;
|
||||
break;
|
||||
|
@ -612,6 +615,7 @@ define([
|
|||
this.$moreBar.prepend(last_group);
|
||||
if (last_separator) {
|
||||
last_separator.css('display', '');
|
||||
last_separator.removeAttr('hidden-on-resize');
|
||||
}
|
||||
}
|
||||
last_group.prepend(child);
|
||||
|
@ -638,6 +642,7 @@ define([
|
|||
} else if (item.hasClass('separator')) {
|
||||
this.$moreBar.prepend(item);
|
||||
item.css('display', 'none');
|
||||
item.attr('hidden-on-resize', true);
|
||||
last_separator = item;
|
||||
hideAllMenus = true;
|
||||
}
|
||||
|
@ -683,6 +688,7 @@ define([
|
|||
more_section.before(item);
|
||||
if (last_separator) {
|
||||
last_separator.css('display', '');
|
||||
last_separator.removeAttr('hidden-on-resize');
|
||||
}
|
||||
if (this.$moreBar.children().filter('.group').length == 0) {
|
||||
this.hideMoreBtns();
|
||||
|
@ -717,6 +723,7 @@ define([
|
|||
more_section.before(last_group);
|
||||
if (last_separator) {
|
||||
last_separator.css('display', '');
|
||||
last_separator.removeAttr('hidden-on-resize');
|
||||
}
|
||||
}
|
||||
last_group.append(child);
|
||||
|
@ -747,6 +754,7 @@ define([
|
|||
} else if (item.hasClass('separator')) {
|
||||
more_section.before(item);
|
||||
item.css('display', 'none');
|
||||
item.attr('hidden-on-resize', true);
|
||||
last_separator = item;
|
||||
last_width = parseInt(last_separator.css('margin-left')) + parseInt(last_separator.css('margin-right')) + 1;
|
||||
hideAllMenus = true;
|
||||
|
@ -779,7 +787,7 @@ define([
|
|||
right = Common.Utils.innerWidth() - (showxy.left - parentxy.left + target.width()),
|
||||
top = showxy.top - parentxy.top + target.height() + 10;
|
||||
|
||||
moreContainer.css({right: right, left: 'auto', top : top});
|
||||
moreContainer.css({right: right, left: 'auto', top : top, 'max-width': Common.Utils.innerWidth() + 'px'});
|
||||
moreContainer.show();
|
||||
},
|
||||
|
||||
|
|
|
@ -242,6 +242,10 @@ define([
|
|||
$('<div class="separator long"></div>').appendTo(me.$toolbarPanelPlugins);
|
||||
_group = $('<div class="group"></div>');
|
||||
rank_plugins = 0;
|
||||
} else {
|
||||
_group.appendTo(me.$toolbarPanelPlugins);
|
||||
$('<div class="separator long invisible"></div>').appendTo(me.$toolbarPanelPlugins);
|
||||
_group = $('<div class="group" style="padding-left: 0;"></div>');
|
||||
}
|
||||
|
||||
var btn = me.panelPlugins.createPluginButton(model);
|
||||
|
|
|
@ -193,13 +193,18 @@ var utils = new(function() {
|
|||
me.innerHeight = window.innerHeight * me.zoom;
|
||||
me.applicationPixelRatio = scale.applicationPixelRatio || scale.devicePixelRatio;
|
||||
};
|
||||
checkSizeIE = function() {
|
||||
me.innerWidth = window.innerWidth;
|
||||
me.innerHeight = window.innerHeight;
|
||||
};
|
||||
me.zoom = 1;
|
||||
me.applicationPixelRatio = 1;
|
||||
me.innerWidth = window.innerWidth;
|
||||
me.innerHeight = window.innerHeight;
|
||||
if ( isIE )
|
||||
if ( isIE ) {
|
||||
$(document.body).addClass('ie');
|
||||
else {
|
||||
$(window).on('resize', checkSizeIE);
|
||||
} else {
|
||||
checkSize();
|
||||
$(window).on('resize', checkSize);
|
||||
}
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
padding: 12px 10px 7px 0;
|
||||
border-radius: 0;
|
||||
z-index:999;
|
||||
overflow: auto;
|
||||
.compactwidth {
|
||||
.btn-group, .btn-toolbar {
|
||||
&.x-huge {
|
||||
|
@ -231,8 +232,18 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.group {
|
||||
height: 52px !important;
|
||||
}
|
||||
&[data-tab=pivot] {
|
||||
padding: 5px 10px 0 0;
|
||||
.group {
|
||||
height: 60px !important;
|
||||
}
|
||||
.separator {
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,7 +269,7 @@
|
|||
&.small {
|
||||
padding-left: 10px;
|
||||
|
||||
+ .separator {
|
||||
+ .separator:not(.invisible) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
@ -290,6 +301,11 @@
|
|||
margin-left: 5px;
|
||||
}
|
||||
|
||||
&.invisible {
|
||||
margin-left: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
&.long {
|
||||
height: 52px;
|
||||
}
|
||||
|
|
|
@ -3190,6 +3190,7 @@ define([
|
|||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnPaste.$el.find('button').attr('data-hint-direction', 'bottom');
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
me.toolbar.processPanelVisible(null, true, true);
|
||||
}
|
||||
|
||||
if ( config.isDesktopApp ) {
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
<span class="btn-slot" id="slot-btn-mailrecepients" data-layout-name="toolbar-home-mailmerge"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group small flex field-styles" id="slot-field-styles" style="min-width: 160px;width: 100%; " data-group-width="100%"></div>
|
||||
</section>
|
||||
<section class="panel" data-tab="ins">
|
||||
|
|
|
@ -1515,11 +1515,17 @@ define([
|
|||
menu.menuAlignEl = cmp.cmpEl;
|
||||
|
||||
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.cmpEl.css({
|
||||
'width': columnCount * (_width + itemMargin),
|
||||
'width': menuWidth,
|
||||
'min-height': cmp.cmpEl.height()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2606,6 +2606,7 @@ define([
|
|||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnPaste.$el.find('button').attr('data-hint-direction', 'bottom');
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
me.toolbar.processPanelVisible(null, true, true);
|
||||
}
|
||||
|
||||
if ( config.isDesktopApp ) {
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
<span class="btn-slot split" id="slot-btn-slidesize"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group flex small field-styles" id="slot-field-styles" style="width: 100%; min-width: 140px;" data-group-width="100%"></div>
|
||||
</section>
|
||||
<section class="panel" data-tab="ins">
|
||||
|
@ -127,6 +128,7 @@
|
|||
<span class="btn-slot text x-huge slot-insertimg"></span>
|
||||
<span class="btn-slot text x-huge" id="slot-btn-insertchart"></span>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group small" id="slot-combo-insertshape"></div>
|
||||
<div class="separator long"></div>
|
||||
<div class="group">
|
||||
|
@ -212,6 +214,7 @@
|
|||
<div class="btn-slot text" id="animation-trigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group small">
|
||||
<div class="elset font-normal">
|
||||
<span class="btn-slot text" id="animation-duration"></span>
|
||||
|
@ -222,6 +225,7 @@
|
|||
<span id="animation-spin-delay" class="btn-slot text spinner" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group small">
|
||||
<div class="elset font-normal">
|
||||
<span class="btn-slot text" id="animation-repeat"></span>
|
||||
|
|
|
@ -1088,11 +1088,17 @@ define([
|
|||
menu.menuAlignEl = cmp.cmpEl;
|
||||
|
||||
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.cmpEl.css({
|
||||
'width': columnCount * (itemWidth + itemMargin),
|
||||
'width': menuWidth,
|
||||
'min-height': cmp.cmpEl.height()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4303,6 +4303,7 @@ define([
|
|||
me.toolbar.btnPaste.$el.detach().appendTo($box);
|
||||
me.toolbar.btnPaste.$el.find('button').attr('data-hint-direction', 'bottom');
|
||||
me.toolbar.btnCopy.$el.removeClass('split');
|
||||
me.toolbar.processPanelVisible(null, true, true);
|
||||
}
|
||||
|
||||
var tab = {action: 'protect', caption: me.toolbar.textTabProtect, layoutname: 'toolbar-protect', dataHintTitle: 'T'};
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
<span class="btn-slot split" id="slot-btn-table-tpl"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator long invisible"></div>
|
||||
<div class="group small flex field-styles" id="slot-field-styles" style="min-width: 168px;width: 100%;" data-group-width="100%"></div>
|
||||
</section>
|
||||
<section class="panel" data-tab="ins">
|
||||
|
|
|
@ -79,6 +79,7 @@ define([
|
|||
'<span class="btn-slot text" id="slot-chk-header-column"></span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="separator long invisible"></div>' +
|
||||
'<div class="group small">' +
|
||||
'<div class="elset">' +
|
||||
'<span class="btn-slot text" id="slot-chk-banded-row"></span>' +
|
||||
|
@ -87,6 +88,7 @@ define([
|
|||
'<span class="btn-slot text" id="slot-chk-banded-column"></span>' +
|
||||
'</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>' +
|
||||
'</section>';
|
||||
|
@ -279,10 +281,29 @@ define([
|
|||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock, _set['FormatCells'], _set['PivotTables']],
|
||||
beforeOpenHandler: function(e) {
|
||||
var cmp = this,
|
||||
menu = cmp.openButton.menu;
|
||||
menu = cmp.openButton.menu,
|
||||
columnCount = 4;
|
||||
|
||||
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.cmpEl.css({
|
||||
'width': menuWidth,
|
||||
'min-height': cmp.cmpEl.height()
|
||||
});
|
||||
}
|
||||
},
|
||||
dataHint: '1',
|
||||
|
@ -373,10 +394,6 @@ define([
|
|||
this.btnPivotSubtotals.render(this.$el.find('#slot-btn-pivot-subtotals'));
|
||||
this.btnPivotGrandTotals.render(this.$el.find('#slot-btn-pivot-grand-totals'));
|
||||
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;
|
||||
},
|
||||
|
|
|
@ -1330,11 +1330,17 @@ define([
|
|||
menu.menuAlignEl = cmp.cmpEl;
|
||||
|
||||
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.cmpEl.css({
|
||||
'width' : columnCount * (itemWidth + itemMargin),
|
||||
'width': menuWidth,
|
||||
'min-height': cmp.cmpEl.height()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ define([
|
|||
'<span id="slot-btn-protect-sheet" class="btn-slot text x-huge" style="margin-right: 2px;"></span>' +
|
||||
'<span id="slot-btn-allow-ranges" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'<div class="separator long invisible"></div>' +
|
||||
'<div class="group small">' +
|
||||
'<div class="elset">' +
|
||||
'<span class="btn-slot text" id="slot-chk-locked-cell"></span>' +
|
||||
|
@ -61,6 +62,7 @@ define([
|
|||
'<span class="btn-slot text" id="slot-chk-hidden-formula"></span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="separator long invisible"></div>' +
|
||||
'<div class="group small">' +
|
||||
'<div class="elset">' +
|
||||
'<span class="btn-slot text" id="slot-chk-locked-shape"></span>' +
|
||||
|
|
Loading…
Reference in a new issue