diff --git a/src/bundle/Resources/public/js/scripts/edit.header.js b/src/bundle/Resources/public/js/scripts/edit.header.js index df4a37353b..0994b34a01 100644 --- a/src/bundle/Resources/public/js/scripts/edit.header.js +++ b/src/bundle/Resources/public/js/scripts/edit.header.js @@ -11,7 +11,6 @@ const contextMenuNode = headerNode.querySelector('.ibexa-context-menu'); const { height: expandedHeaderHeight } = headerNode.getBoundingClientRect(); const scrolledContent = doc.querySelector('.ibexa-edit-content > :first-child'); - const tooltipNode = headerNode.querySelector('.ibexa-edit-header__tooltip'); const fitHeader = (event) => { const { height: formHeight } = scrolledContent.getBoundingClientRect(); const contentHeightWithExpandedHeader = formHeight + expandedHeaderHeight; @@ -26,17 +25,6 @@ headerNode.classList.toggle('ibexa-edit-header--slim', shouldHeaderBeSlim); }; - const fitTooltipTrigger = (event) => { - const firstContextMenuItem = contextMenuNode.querySelector('.ibexa-context-menu__item'); - const leftPosition = firstContextMenuItem.offsetLeft; - - tooltipNode.style.marginLeft = `${leftPosition}px`; - }; contentNode.addEventListener('scroll', fitHeader, false); - - if (tooltipNode) { - global.addEventListener('resize', fitTooltipTrigger, false); - fitTooltipTrigger(); - } })(window, window.document, window.ibexa); diff --git a/src/bundle/Resources/public/scss/_edit-header.scss b/src/bundle/Resources/public/scss/_edit-header.scss index eb05a216ab..8e52ec0807 100644 --- a/src/bundle/Resources/public/scss/_edit-header.scss +++ b/src/bundle/Resources/public/scss/_edit-header.scss @@ -14,6 +14,10 @@ flex-direction: column; } + &__title { + display: flex; + } + &__row { display: flex; flex-wrap: nowrap; @@ -75,6 +79,7 @@ } &__tooltip { + margin-left: calculateRem(8px); display: flex; align-items: center; justify-content: center; diff --git a/src/bundle/Resources/views/themes/admin/ui/edit_header.html.twig b/src/bundle/Resources/views/themes/admin/ui/edit_header.html.twig index ee13ea126f..42195adccb 100644 --- a/src/bundle/Resources/views/themes/admin/ui/edit_header.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/edit_header.html.twig @@ -20,14 +20,6 @@
- {% if (description is defined and description|length) or content is defined %} -
- - - -
- {% endif %} - {{ context_actions|default('')|raw }}
@@ -39,7 +31,16 @@
-

{{ title }}

+

+ {{ title }} + {% if (description is defined and description|length) or content is defined %} +
+ + + +
+ {% endif %} +

{% if subtitle is defined %}
{{ subtitle|raw }}