From 634c0b6895627b13e5a3652c804fd0ba70a06915 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 13 Jul 2022 19:30:38 +0300 Subject: [PATCH] Fix more section (small browser size) --- apps/common/main/lib/component/Mixtbar.js | 11 +++++++++-- apps/common/main/resources/less/toolbar.less | 8 +++++++- .../documenteditor/main/app/template/Toolbar.template | 1 + .../main/app/template/Toolbar.template | 4 ++++ .../main/app/template/Toolbar.template | 1 + apps/spreadsheeteditor/main/app/view/PivotTable.js | 2 ++ apps/spreadsheeteditor/main/app/view/WBProtection.js | 2 ++ 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js index cfc80e618..c1e6c29f8 100644 --- a/apps/common/main/lib/component/Mixtbar.js +++ b/apps/common/main/lib/component/Mixtbar.js @@ -562,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; @@ -586,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 ) { @@ -596,6 +597,7 @@ define([ this.$moreBar.prepend(item); if (last_separator) { last_separator.css('display', ''); + last_separator.removeAttr('hidden-on-resize'); } hideAllMenus = true; break; @@ -613,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); @@ -639,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; } @@ -684,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(); @@ -718,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); @@ -748,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; @@ -780,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(); }, diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index c78364c45..23cf89c5b 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -214,6 +214,7 @@ padding: 12px 10px 7px 0; border-radius: 0; z-index:999; + overflow: hidden; .compactwidth { .btn-group, .btn-toolbar { &.x-huge { @@ -258,7 +259,7 @@ &.small { padding-left: 10px; - + .separator { + + .separator:not(.invisible) { margin-left: 10px; } } @@ -290,6 +291,11 @@ margin-left: 5px; } + &.invisible { + margin-left: 0; + border: none; + } + &.long { height: 52px; } diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template index 593bd1710..6271e1249 100644 --- a/apps/documenteditor/main/app/template/Toolbar.template +++ b/apps/documenteditor/main/app/template/Toolbar.template @@ -86,6 +86,7 @@ +
diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template index e0efc5b52..bf331e84d 100644 --- a/apps/presentationeditor/main/app/template/Toolbar.template +++ b/apps/presentationeditor/main/app/template/Toolbar.template @@ -109,6 +109,7 @@ +
@@ -127,6 +128,7 @@ +
@@ -212,6 +214,7 @@
+
@@ -222,6 +225,7 @@
+
diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index a2ca6ae33..7671925c2 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -124,6 +124,7 @@
+
diff --git a/apps/spreadsheeteditor/main/app/view/PivotTable.js b/apps/spreadsheeteditor/main/app/view/PivotTable.js index 9513fd36b..f5c4396be 100644 --- a/apps/spreadsheeteditor/main/app/view/PivotTable.js +++ b/apps/spreadsheeteditor/main/app/view/PivotTable.js @@ -79,6 +79,7 @@ define([ '' + '' + '' + + '' + '
' + '
' + '' + @@ -87,6 +88,7 @@ define([ '' + '
' + '
' + + '' + '
' + '
' + '
'; diff --git a/apps/spreadsheeteditor/main/app/view/WBProtection.js b/apps/spreadsheeteditor/main/app/view/WBProtection.js index de163aff6..8f9e7efed 100644 --- a/apps/spreadsheeteditor/main/app/view/WBProtection.js +++ b/apps/spreadsheeteditor/main/app/view/WBProtection.js @@ -53,6 +53,7 @@ define([ '' + '' + '' + + '' + '
' + '
' + '' + @@ -61,6 +62,7 @@ define([ '' + '
' + '
' + + '' + '
' + '
' + '' +