Browse Source

Bugfix interpret Repo Variables CUSTOM_CSS and CUSTOM_JS #375529

master
Daniel Quathamer 5 days ago
parent
commit
6509871ea7
  1. 4
      src/de/superx/common/Maske.java
  2. 16
      superx/xml/nd_templates.xsl
  3. 30
      superx/xml/pageComponents_html.xsl

4
src/de/superx/common/Maske.java

@ -2047,7 +2047,7 @@ public class Maske extends NamedIdObject { @@ -2047,7 +2047,7 @@ public class Maske extends NamedIdObject {
.get("content").toString();
if(customcss!=null && !customcss.trim().equals(""))
{
result.append("<custom_css><style type=\"text/css\"><![CDATA["+customcss+"]]></style></custom_css>");
result.append("<custom_css><![CDATA["+customcss+"]]></custom_css>");
}
}
if (key.startsWith("CUSTOM_JS")) {
@ -2055,7 +2055,7 @@ public class Maske extends NamedIdObject { @@ -2055,7 +2055,7 @@ public class Maske extends NamedIdObject {
.get("content").toString();
if(customjs!=null && !customjs.trim().equals(""))
{
result.append("<custom_js><script language=\"javascript\"><![CDATA["+customjs+"]]></script></custom_js>");
result.append("<custom_js><![CDATA["+customjs+"]]></custom_js>");
}
}
}

16
superx/xml/nd_templates.xsl

@ -35,16 +35,18 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sx="http://memtext.de" xm @@ -35,16 +35,18 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sx="http://memtext.de" xm
<LINK REL="stylesheet" type="text/css" href="$css" ></LINK>
</xsl:if>
<xsl:if test="/*/custom_css != ''">
<style type="text/css"><xsl:value-of select="/*/custom_css/child::*"/></style>
<xsl:if test="/**/custom_css != ''">
<style type="text/css">
<xsl:value-of select="//custom_css"/>
</style>
</xsl:if>
<xsl:if test="/*/custom_js != ''">
<script language="javascript">
<xsl:value-of select="/*/custom_js/child::*"/>
</script>
<xsl:if test="/**/custom_js != ''">
<script language="JavaScript" type="text/javascript">
<xsl:value-of select="//custom_js"/>
</script>
</xsl:if>
</xsl:template>
<!--#Template Ende htmlhead-->
<xsl:template name="nd_htmlscript">

30
superx/xml/pageComponents_html.xsl

@ -1867,14 +1867,15 @@ and not(ends-with(filename,'.jrxml'))"> @@ -1867,14 +1867,15 @@ and not(ends-with(filename,'.jrxml'))">
<xsl:if test="$css != ''">
<link rel="stylesheet" type="text/css" href="{$css}" />
</xsl:if>
<xsl:if test="/*/custom_css != ''">
<style type="text/css"><xsl:value-of select="/*/custom_css/child::*"/></style>
<xsl:if test="/**/custom_css != ''">
<style type="text/css">
<xsl:value-of select="//custom_css"/>
</style>
</xsl:if>
<xsl:if test="/*/custom_js != ''">
<script language="javascript">
<xsl:value-of select="/*/custom_js/child::*"/>
</script>
<xsl:if test="/**/custom_js != ''">
<script language="JavaScript" type="text/javascript">
<xsl:value-of select="//custom_js"/>
</script>
</xsl:if>
</head>
@ -1922,14 +1923,15 @@ and not(ends-with(filename,'.jrxml'))"> @@ -1922,14 +1923,15 @@ and not(ends-with(filename,'.jrxml'))">
<xsl:if test="$css != ''">
<link rel="stylesheet" type="text/css" href="{$css}" />
</xsl:if>
<xsl:if test="/*/custom_css != ''">
<style type="text/css"><xsl:value-of select="/*/custom_css/child::*"/></style>
<xsl:if test="/**/custom_css != ''">
<style type="text/css">
<xsl:value-of select="//custom_css"/>
</style>
</xsl:if>
<xsl:if test="/*/custom_js != ''">
<script language="javascript">
<xsl:value-of select="/*/custom_js/child::*"/>
</script>
<xsl:if test="/**/custom_js != ''">
<script language="JavaScript" type="text/javascript">
<xsl:value-of select="//custom_js"/>
</script>
</xsl:if>
</head>

Loading…
Cancel
Save