From f5ed2f4231025647c91dca3ac9c55a8a2f9cc468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Tue, 18 Oct 2022 12:24:50 +0200 Subject: [PATCH 1/2] IBX-4044: Option to use HTML in tooltips --- .../Resources/public/js/scripts/helpers/tooltips.helper.js | 3 ++- .../themes/admin/content/edit/content_header.html.twig | 6 +++++- .../Resources/views/themes/admin/ui/edit_header.html.twig | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js b/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js index c8f4905c7f..10921a16d5 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js @@ -112,6 +112,7 @@ const extraClass = tooltipNode.dataset.tooltipExtraClass ?? ''; const placement = tooltipNode.dataset.tooltipPlacement ?? 'bottom'; const trigger = tooltipNode.dataset.tooltipTrigger ?? 'hover focus'; + const useHtml = tooltipNode.dataset.tooltipUseHtml !== undefined; const container = tooltipNode.dataset.tooltipContainerSelector ? tooltipNode.closest(tooltipNode.dataset.tooltipContainerSelector) : 'body'; @@ -132,7 +133,7 @@ trigger, container, popperConfig: modifyPopperConfig.bind(null, iframe), - html: true, + html: useHtml, template: `
diff --git a/src/bundle/Resources/views/themes/admin/content/edit/content_header.html.twig b/src/bundle/Resources/views/themes/admin/content/edit/content_header.html.twig index 2e1a18d07c..df66d3e9f1 100644 --- a/src/bundle/Resources/views/themes/admin/content/edit/content_header.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/edit/content_header.html.twig @@ -10,7 +10,11 @@
{% if (description is defined and description|length) or content is defined %} -
+
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 b9232c2279..21ea92cd89 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 @@ -34,7 +34,11 @@

{{ title }} {% if (description is defined and description|length) or content is defined and content is not null %} -
+
From 81949dd6514311e7a7653456e0c12c32a25f4828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Thu, 20 Oct 2022 13:45:42 +0200 Subject: [PATCH 2/2] fix indents --- .../Resources/views/themes/admin/ui/edit_header.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 21ea92cd89..ff6cb6e78b 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 @@ -37,7 +37,7 @@