From patchwork Mon Mar 6 17:04:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6669 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PVlLF2mnLz3wfc for ; Mon, 6 Mar 2023 17:04:37 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PVlL860Kwz3Bc; Mon, 6 Mar 2023 17:04:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PVlL82Vynz300C; Mon, 6 Mar 2023 17:04:32 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PVlL56YN2z2y0c for ; Mon, 6 Mar 2023 17:04:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PVlL5439pzkg; Mon, 6 Mar 2023 17:04:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1678122269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLI+sJIm2FSGz+nlPshDB1yWNlXhCRoIS+bJlcSyOIM=; b=UsMhmNgjd1JmBV3LYwluFO9QH+pgjKbr4R5ESODAomwRXcx6q43iH7EAaSmiqkRlMyqksJ 5CEstxHhZnRO1WCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1678122269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CLI+sJIm2FSGz+nlPshDB1yWNlXhCRoIS+bJlcSyOIM=; b=Z6zHXTdk7DrPIUXlFf0c8bc1+EduSLf+nxput9ds+IM6ZKSOwfY0YQ/vYzqIlF7AWeUIzu yAqDaZE5u0FGK9Ecuk/bja2Mp3lNZW2K9BNRUWQeN5W1HEXsBvXFGzpKbkZvWBa9kChstj 9SP34PI8LonVxavEKYNnqJw5hpXGL67jedqARx53iaIPiwyd11TLFBi9Wq/0HzezJjUtUA /eFTWQMv1ADCy+iUjxUMGbZrmc7pFePLWE7cQW3OA3WdmgZWsmZy3iC7SrmyxmqGZYecB8 josmQ5oUDBhCpXs0MWBFSIpOkoIBzq2juF96EFp4SYoqpU3X9+RETic26YfvMA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] updatexlrator.cgi: Update to naming of variables in css section Date: Mon, 6 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> References: <20230306170424.3447723-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - This updates the updatexlrator.cgi page to the same central use of extraHead 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 = < 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=(); &General::readhash("${General::swroot}/proxy/settings", \%proxysettings); &General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color); -###--- HTML HEAD ---### -my $extraHead = < - .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'} = ''; $xlratorsettings{'ENABLE_LOG'} = 'off'; $xlratorsettings{'PASSIVE_MODE'} = 'off'; @@ -409,7 +369,7 @@ $selected{'NOT_ACCESSED_LAST'}{$xlratorsettings{'NOT_ACCESSED_LAST'}} = "selecte &Header::showhttpheaders(); -&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, $extraHead); +&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, $Header::extraHead); &Header::openbigbox('100%', 'left', '', $errormessage); @@ -572,9 +532,9 @@ END $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } $filesize = $size_updatefile; 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; @@ -863,9 +823,9 @@ foreach (@vendors) $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } print " "; @@ -1202,9 +1162,9 @@ END $id++; if ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } $filesize = $size_updatefile; 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;