Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-3792: Fixed display meta tab #661

Merged
merged 3 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

const header = doc.querySelector('.ibexa-edit-header');
const headerContainer = header.querySelector('.ibexa-edit-header__container');
const headerContainer = header?.querySelector('.ibexa-edit-header__container');
const SECTION_ADJUST_MARGIN_TOP = 20;
const formContainerNode = doc.querySelector('.ibexa-edit-content');
const getSectionGroupActiveItems = () => {
Expand Down Expand Up @@ -117,7 +117,7 @@

if (!firstSection.isSameNode(lastSection) && lastSection.offsetHeight) {
const lastSectionHeight = lastSection.offsetHeight;
const headerHeight = headerContainer.offsetHeight;
const headerHeight = headerContainer?.offsetHeight;
const contentColumnHeight = contentColumn.offsetHeight;
const additionalContentHeight = contentContainer.offsetHeight - sectionGroup.offsetHeight;
const valueToCorrectHeightDiff = headerHeight + SECTION_ADJUST_MARGIN_TOP + additionalContentHeight;
Expand All @@ -136,9 +136,9 @@
formContainerNode.addEventListener('scroll', () => {
let firstVisibleSection = currentlyVisibleSections.find((section) => {
const { top, height } = section.getBoundingClientRect();
const headerBottomContainerHeight = header.offsetHeight - headerContainer.offsetHeight;
const headerBottomContainerHeight = header.offsetHeight - headerContainer?.offsetHeight;

return top + height >= headerContainer.offsetHeight + headerBottomContainerHeight + SECTION_ADJUST_MARGIN_TOP;
return top + height >= headerContainer?.offsetHeight + headerBottomContainerHeight + SECTION_ADJUST_MARGIN_TOP;
});

if (!firstVisibleSection) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,31 @@
'language': language
}) }}
{% endblock %}

{% block anchor_menu %}
{% set content_edit_anchor_menu = knp_menu_get('ibexa.admin_ui.menu.content_edit.anchor_menu', [], {
content,
'content_type': content_type,
'location': location,
'parent_location': parent_location,
'language': language,
'grouped_fields': grouped_fields,
}) %}

{% embed '@ibexadesign/ui/anchor_navigation_menu.html.twig' with anchor_params %}
{% block navigation_menu_body %}
{{ knp_menu_render(content_edit_anchor_menu, { 'template': '@ibexadesign/ui/menu/anchor_menu.html.twig' }) }}
{% endblock %}
{% endembed %}
{% endblock %}

{% block content_sections %}
{{ ibexa_render_component_group('content-edit-sections', {
'form': form,
'content': content,
'content_type': content_type,
'location': location,
'parent_location': parent_location,
'language': language
}) }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,31 @@
'language': language
}) }}
{% endblock %}

{% block anchor_menu %}
{% set content_edit_anchor_menu = knp_menu_get('ibexa.admin_ui.menu.content_edit.anchor_menu', [], {
'content': content,
'content_type': content_type,
'location': location,
'parent_location': parent_location,
'language': language,
'grouped_fields': grouped_fields,
}) %}

{% embed '@ibexadesign/ui/anchor_navigation_menu.html.twig' with anchor_params %}
{% block navigation_menu_body %}
{{ knp_menu_render(content_edit_anchor_menu, { 'template': '@ibexadesign/ui/menu/anchor_menu.html.twig' }) }}
{% endblock %}
{% endembed %}
{% endblock %}

{% block content_sections %}
{{ ibexa_render_component_group('content-edit-sections', {
'form': form,
'content': content,
'content_type': content_type,
'location': location,
'parent_location': parent_location,
'language': language
}) }}
{% endblock %}