The Foundry CSS loader now uses conditional comments for IE hacks instead of

using the user agent string transmitted by the User Agent to the server. 


git-svn-id: https://svn.libreccm.org/ccm/trunk@3095 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-01-19 20:09:58 +00:00
parent d2b3f7260b
commit 8987ff7663
2 changed files with 29 additions and 28 deletions

View File

@ -112,26 +112,28 @@
<!-- Include IE Hacks only for very old IEs (IE 6) --> <!-- Include IE Hacks only for very old IEs (IE 6) -->
<!-- jensp 2014-09-16 This is copied from Mandalay. Maybe remove and relay and use <!-- jensp 2014-09-16 This is copied from Mandalay. Maybe remove and relay and use
conditional comments in the other CSS files instead? --> conditional comments in the other CSS files instead? -->
<xsl:if test="$msie_version >= '5' and $msie_version &lt; '7'">
<xsl:choose> <xsl:value-of select="'&#x3c;!--[if lt IE 9]&#x3e;'" disable-output-escaping="yes"/>
<xsl:when test="$css-files-map/css-files/application[@name=$application]"> <xsl:choose>
<xsl:for-each select="document(foundry:gen-path('conf/css-files.xml'))/css-files/application[@name=$application]/iehacks"> <xsl:when test="$css-files-map/css-files/application[@name=$application]">
<xsl:call-template name="foundry:load-css-file"> <xsl:for-each select="$css-files-map/css-files/application[@name=$application]/iehacks">
<xsl:with-param name="filename" select="."/> <xsl:call-template name="foundry:load-css-file">
<xsl:with-param name="media" select="./@media"/> <xsl:with-param name="filename" select="."/>
</xsl:call-template> <xsl:with-param name="media" select="./@media"/>
</xsl:for-each> </xsl:call-template>
</xsl:when> </xsl:for-each>
<xsl:otherwise> </xsl:when>
<xsl:for-each select="$css-files-map/css-files/default/iehacks"> <xsl:otherwise>
<xsl:call-template name="foundry:load-css-file"> <xsl:for-each select="$css-files-map/css-files/default/iehacks">
<xsl:with-param name="filename" select="."/> <xsl:call-template name="foundry:load-css-file">
<xsl:with-param name="media" select="./@media"/> <xsl:with-param name="filename" select="."/>
</xsl:call-template> <xsl:with-param name="media" select="./@media"/>
</xsl:for-each> </xsl:call-template>
</xsl:otherwise> </xsl:for-each>
</xsl:choose> </xsl:otherwise>
</xsl:if> </xsl:choose>
<xsl:value-of select="'&#x3c;![endif]--&#x3e;'" disable-output-escaping="yes"/>
</xsl:template> </xsl:template>
@ -341,12 +343,11 @@
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="load-html5shiv"> <xsl:template match="load-html5shiv">
<xsl:value-of select="concat(' <xsl:value-of disable-output-escaping="yes"
&lt;!-- select="concat('&#x0a;
&lt;!-[if lt IE 9]&gt; &lt;!--[if lt IE 9]&gt;&#x0a;
&lt;script src=&quot;', $context-prefix, '/assets/html5shiv.js&quot;/&gt; &lt;script src=&quot;', $context-prefix, '/assets/html5shiv.js&quot;/&gt;&#x0a;
&lt;![endif] &lt;![endif]--&gt;')"/>
--&gt;')"/>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>