Page 1 of 1
Table reflow
Posted: Wed Jan 20, 2016 8:48 pm
by rdelong
Our tech pubs group is very interested in applying the responsive table reflow feature of the JQuery framework. Are there any plans to support table reflow in a future release of the WebHelp plugin?
Here's a link that describes what I'm referring to:
http://demos.jquerymobile.com/1.3.0-bet ... eflow.html
Re: Table reflow
Posted: Fri Jan 22, 2016 3:45 pm
by bogdan_cercelaru
Hello,
You can apply the responsive table reflow feature of the JQuery framework by adding the necessary attributes to the
table element:
- data-role="table"
- class="ui-responsive"
To add this attibute you should modify the "[DITA-OT]/plugins/com.oxygenxml.webhelp/xsl/dita/mobile/fixup.xsl" file and replace the following template:
Code: Select all
<xsl:template match="*:table" mode="fixup_mobile">
<div class="tablemob">
<xsl:copy>
<xsl:apply-templates select="@*" mode="fixup_mobile"/>
<xsl:apply-templates mode="fixup_mobile"/>
</xsl:copy>
</div>
</xsl:template>
with
Code: Select all
<xsl:template match="*:table" mode="fixup_mobile">
<div class="tablemob">
<xsl:copy>
<xsl:apply-templates select="@*" mode="fixup_mobile"/>
<xsl:attribute name="data-role">table</xsl:attribute>
<xsl:variable name="class" select="@class"/>
<xsl:attribute name="class"><xsl:value-of select="$class"/> ui-responsive</xsl:attribute>
<xsl:apply-templates mode="fixup_mobile"/>
</xsl:copy>
</div>
</xsl:template>
Regards,
Bogdan