Table reflow

Are you missing a feature? Request its implementation here.
rdelong
Posts: 72
Joined: Tue Oct 21, 2014 10:01 pm

Table reflow

Post 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
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Table reflow

Post 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
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply