From 94cf4fa37a6baa7e231d74efd8a15880c2dd71e1 Mon Sep 17 00:00:00 2001 From: Alessandro Lorenzi Date: Thu, 28 Jul 2022 18:06:31 +0200 Subject: [PATCH] fix(frio): "Data" move header in template w/ l10n fix: #11581 --- view/theme/frio/js/module/admin/logs/view.js | 8 +++++++- view/theme/frio/templates/admin/logs/view.tpl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/view/theme/frio/js/module/admin/logs/view.js b/view/theme/frio/js/module/admin/logs/view.js index 245518822..9faf9ec89 100644 --- a/view/theme/frio/js/module/admin/logs/view.js +++ b/view/theme/frio/js/module/admin/logs/view.js @@ -64,10 +64,16 @@ $(function(){ }); var elm = $modal.find(".event-data")[0]; + const event_data_header = $modal.find(".event-data-header")[0]; + + // Cleanup event data + event_data_header.hidden = true; elm.innerHTML = ""; + + // Fill out event data var data = element.dataset.data; if (data !== "") { - elm.innerHTML = "

Data

"; + event_data_header.hidden = false; data = JSON.parse(data); elm.innerHTML += recursive_details("", data); } diff --git a/view/theme/frio/templates/admin/logs/view.tpl b/view/theme/frio/templates/admin/logs/view.tpl index d47c0361d..d5ad41f21 100644 --- a/view/theme/frio/templates/admin/logs/view.tpl +++ b/view/theme/frio/templates/admin/logs/view.tpl @@ -121,7 +121,7 @@ - +

{{$l10n.Data}}