ipfire-theme/functions.pl: Load $extrahead after jQuery

Message ID 20211127191043.1279-1-hofmann@leo-andres.de
State Accepted
Commit b91a0f297ab27cc5bbbc0c9777a2fe8bc881ae01
Headers show
Series ipfire-theme/functions.pl: Load $extrahead after jQuery | expand

Commit Message

Leo-Andres Hofmann Nov. 27, 2021, 7:10 p.m. UTC
This ensures that jQuery is also available for custom javascript
added to the HTML <head> with $extrahead.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
---
 html/html/themes/ipfire/include/functions.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Tremer Nov. 28, 2021, noon UTC | #1
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>

> On 27 Nov 2021, at 19:10, Leo-Andres Hofmann <hofmann@leo-andres.de> wrote:
> 
> This ensures that jQuery is also available for custom javascript
> added to the HTML <head> with $extrahead.
> 
> Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
> ---
> html/html/themes/ipfire/include/functions.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl
> index 18931428e..54f8966d5 100644
> --- a/html/html/themes/ipfire/include/functions.pl
> +++ b/html/html/themes/ipfire/include/functions.pl
> @@ -120,12 +120,12 @@ print <<END;
> <html>
> 	<head>
> 	<title>$headline - $title</title>
> -	$extrahead
> 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> 	<link rel="shortcut icon" href="/favicon.ico" />
> 	<script type="text/javascript" src="/include/jquery.js"></script>
> 	<script src="/include/rrdimage.js"></script>
> 
> +	$extrahead
> 	<script type="text/javascript">
> 		function swapVisibility(id) {
> 			\$('#' + id).toggle();
> -- 
> 2.27.0.windows.1
>

Patch

diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl
index 18931428e..54f8966d5 100644
--- a/html/html/themes/ipfire/include/functions.pl
+++ b/html/html/themes/ipfire/include/functions.pl
@@ -120,12 +120,12 @@  print <<END;
 <html>
 	<head>
 	<title>$headline - $title</title>
-	$extrahead
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 	<link rel="shortcut icon" href="/favicon.ico" />
 	<script type="text/javascript" src="/include/jquery.js"></script>
 	<script src="/include/rrdimage.js"></script>
 
+	$extrahead
 	<script type="text/javascript">
 		function swapVisibility(id) {
 			\$('#' + id).toggle();