Skip to content

Commit

Permalink
Attempt to hide the progress bar by adding an override of `ldh:Render…
Browse files Browse the repository at this point in the history
…Row` in object.xsl
  • Loading branch information
namedgraph committed Dec 22, 2024
1 parent 290bd73 commit b2ddc4f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ exclude-result-prefixes="#all"

<xsl:template match="*" mode="ldh:RenderRow">
<xsl:apply-templates mode="#current"/>

<xsl:for-each select="ancestor::div[contains-token(@class, 'span12')][contains-token(@class, 'progress')][contains-token(@class, 'active')]">
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress-striped', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'active', false() ])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>
</xsl:template>

<!-- hide type control -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ exclude-result-prefixes="#all"
</xsl:template>

<!-- render chart block -->
<xsl:template match="*[@about][@typeof = ('&ldh;ResultSetChart', '&ldh;GraphChart')][descendant::*[@property = '&spin;query'][@resource]][descendant::*[@property = '&ldh;chartType'][@resource]]" mode="ldh:RenderRow" priority="1">
<xsl:template match="*[@about][@typeof = ('&ldh;ResultSetChart', '&ldh;GraphChart')][descendant::*[@property = '&spin;query'][@resource]][descendant::*[@property = '&ldh;chartType'][@resource]]" mode="ldh:RenderRow" priority="2"> <!-- prioritize above block.xsl -->
<xsl:param name="block" select="ancestor-or-self::div[contains-token(@class, 'block')][1]" as="element()"/>
<xsl:param name="about" select="$block/@about" as="xs:anyURI"/>
<xsl:param name="container" select="." as="element()"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,15 @@ exclude-result-prefixes="#all"
</xsl:choose>
</xsl:template>

<xsl:template match="*[@typeof]" mode="ldh:RenderRow" priority="1">
<xsl:apply-templates mode="#current"/>

<!-- hide the progress bar -->
<xsl:for-each select="ancestor::div[contains-token(@class, 'span12')][contains-token(@class, 'progress')][contains-token(@class, 'active')]">
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress-striped', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'active', false() ])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exclude-result-prefixes="#all"

<!-- render view -->

<xsl:template match="*[@typeof = '&ldh;View'][descendant::*[@property = '&spin;query'][@resource]]" mode="ldh:RenderRow" priority="1">
<xsl:template match="*[@typeof = '&ldh;View'][descendant::*[@property = '&spin;query'][@resource]]" mode="ldh:RenderRow" priority="2"> <!-- prioritize above block.xsl -->
<xsl:param name="block" select="ancestor-or-self::div[contains-token(@class, 'block')][1]" as="element()"/>
<!-- <xsl:param name="about" select="$block/@about" as="xs:anyURI"/>-->
<xsl:param name="this" select="ac:absolute-path(ldh:base-uri(.))" as="xs:anyURI"/> <!-- document URL -->
Expand Down

0 comments on commit b2ddc4f

Please sign in to comment.