From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] updatexlrator.cgi: Update to naming of variables in css section Date: Mon, 06 Mar 2023 18:04:24 +0100 Message-ID: <20230306170424.3447723-2-adolf.belka@ipfire.org> In-Reply-To: <20230306170424.3447723-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8235584277944718074==" List-Id: --===============8235584277944718074== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - This updates the updatexlrator.cgi page to the same central use of extraHea= d from header.pl and simplifying of css variables where appropriate. - The variables for the percentage bar will also be able to be used in other = cgi pages with a percent bar. Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/cfgroot/header.pl | 25 ++++++++++++++++ html/cgi-bin/updatexlrator.cgi | 54 +++++----------------------------- 2 files changed, 32 insertions(+), 47 deletions(-) diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index e4d917161..955ed2646 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -58,6 +58,31 @@ $Header::extraHead =3D < END ; diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index 47d3cca42..09f9f5de1 100644 --- a/html/cgi-bin/updatexlrator.cgi +++ b/html/cgi-bin/updatexlrator.cgi @@ -105,46 +105,6 @@ my @metadata=3D(); &General::readhash("${General::swroot}/proxy/settings", \%proxysettings); &General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", = \%color); =20 -###--- HTML HEAD ---### -my $extraHead =3D < - .row-color20 { - background-color: $color{'color20'}; - } - .row-color22 { - background-color: $color{'color22'}; - } - .row-table1colour { - background-color: $Header::table1colour; - } - .row-table2colour { - background-color: $Header::table2colour; - } - .percent-box { - border-style: solid; - border-width: 1px; - border-color: #a0a0a0; - width: 100px; - height: 10px; - } - .percent-bar { - background-color: #a0a0a0; - border-style: solid; - border-width: 1px; - border-color: #e2e2e2; - } - .percent-space { - background-color: #e2e2e2; - border-style: solid; - border-width: 1px; - border-color: #e2e2e2; - } - -END -; -###--- END HTML HEAD ---### - - $xlratorsettings{'ACTION'} =3D ''; $xlratorsettings{'ENABLE_LOG'} =3D 'off'; $xlratorsettings{'PASSIVE_MODE'} =3D 'off'; @@ -409,7 +369,7 @@ $selected{'NOT_ACCESSED_LAST'}{$xlratorsettings{'NOT_ACCE= SSED_LAST'}} =3D "selecte =20 &Header::showhttpheaders(); =20 -&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, $extraHead); +&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, $Header::extraHead= ); =20 &Header::openbigbox('100%', 'left', '', $errormessage); =20 @@ -572,9 +532,9 @@ END =20 $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } =20 $filesize =3D $size_updatefile; 1 while $filesize =3D~ s/^(-?\d+)(\d{3})/$1.$2/; @@ -863,9 +823,9 @@ foreach (@vendors) =20 $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } =20 print " "; =20 @@ -1202,9 +1162,9 @@ END =20 $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } =20 $filesize =3D $size_updatefile; 1 while $filesize =3D~ s/^(-?\d+)(\d{3})/$1.$2/; --=20 2.39.2 --===============8235584277944718074==--