Table reflow

Are you missing a feature? Request it's implementation here.
rdelong
Posts: 71
Joined: Tue Oct 21, 2014 10:01 pm

Table reflow

Post by rdelong » Wed Jan 20, 2016 8:48 pm

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: 221
Joined: Tue Jul 01, 2014 11:48 am

Re: Table reflow

Post by bogdan_cercelaru » Fri Jan 22, 2016 3:45 pm

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