From 022b85bd692a3a36111a4eea94649141db0ea132 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Thu, 25 Sep 2025 10:35:37 +0100 Subject: [PATCH] * Thu Sep 25 2025 Brian Read 11.0.0-118.sme - Remove inline style for legacy panel [SME: 13177] --- .../themes/default/public/css/legacypanel.css | 4 ++++ .../themes/default/public/js/legacypanel.js | 6 ++++++ .../themes/default/templates/embedded.html.ep | 16 ++++++++++++---- smeserver-manager.spec | 5 ++++- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 root/usr/share/smanager/themes/default/public/css/legacypanel.css create mode 100644 root/usr/share/smanager/themes/default/public/js/legacypanel.js diff --git a/root/usr/share/smanager/themes/default/public/css/legacypanel.css b/root/usr/share/smanager/themes/default/public/css/legacypanel.css new file mode 100644 index 0000000..4bdcfea --- /dev/null +++ b/root/usr/share/smanager/themes/default/public/css/legacypanel.css @@ -0,0 +1,4 @@ +.legacy-embedded { + width: 99%; + height: 600px; /* fallback default, matches your $height default */ +} \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/public/js/legacypanel.js b/root/usr/share/smanager/themes/default/public/js/legacypanel.js new file mode 100644 index 0000000..385f381 --- /dev/null +++ b/root/usr/share/smanager/themes/default/public/js/legacypanel.js @@ -0,0 +1,6 @@ +document.addEventListener('DOMContentLoaded', function() { + var obj = document.getElementById('legacy-embedded'); + if (obj && obj.dataset.legacyHeight) { + obj.style.height = obj.dataset.legacyHeight; + } +}); \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/embedded.html.ep b/root/usr/share/smanager/themes/default/templates/embedded.html.ep index 4933f44..21548cb 100644 --- a/root/usr/share/smanager/themes/default/templates/embedded.html.ep +++ b/root/usr/share/smanager/themes/default/templates/embedded.html.ep @@ -14,10 +14,18 @@ % }

Embedded - <%= $title %>


-

If the legacy panel does not appear, then you may not be logged into the original Server manager.
You can log in by clicking here. Or by clicking on the "Legacy SM" button at the top of the window.

- % my $height = $c->stash('height') | '600px'; +

If the legacy panel does not appear, then you may not be logged into the original Server manager.
You can log in by clicking here.

+ % my $height = $c->stash('height') || '600px'; % if ( $height !~ /px$/ ) { $height = $height . 'px'; } - <%= $c->stash('title') %> not found + % # Add the height as a data attribute + + <%= $c->stash('title') %> not found + -% end +% end \ No newline at end of file diff --git a/smeserver-manager.spec b/smeserver-manager.spec index bd7f745..db0cc7a 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme Server Configuration : Manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 117 +%define release 118 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -147,6 +147,9 @@ true %defattr(-,root,root) %changelog +* Thu Sep 25 2025 Brian Read 11.0.0-118.sme +- Remove inline style for legacy panel [SME: 13177] + * Wed Sep 24 2025 Jean-Philippe Pialasse 11.0.0-117.sme - set correctly X-Forwarded-Proto for TKT auth [SME: 13175] updated CSP for smanager