Creating dropdown behavior using character styles
Version |
Date |
Changes |
1.0 |
2006-11-30 |
Initial version. |
1.1 |
2006-11-31 |
Modified so and so... |
Description
We need ePublisher to provide an API mechanism or GUI setting that adds the Dropdown setting in the Character Styles Options Tab pane, or we need the Character Style Dropdown to be implemented via XSLT in a "straight-forward" manner.
Currently ePublisher Pro provides a paragraph style for implementing a Dropdown that is enabled by the Dropdown setting in the Paragraph Styles Options Tab pane. In order to use this feature we have had to create new styles specifically to use dropdowns, nearly doubling the number of styles in our FrameMaker files.
If a writer also adds a hypertext link for a jump to another topic in one of these drop-down style paragraphs, both features activate and create confusion.
Contents
Files to be modified
This will be a change in the content.xsl file and also an FTI file
Code level changes
Look in content.xsl for any comment that says "Dropdown"
Line 1038
<!-- Dropdown --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <xsl:attribute name="onclick"> <xsl:value-of select="concat('WebWorks_ToggleDIV(WebWorksRootPath, "wwdd', $ParamParagraph/@id, '");')" /> </xsl:attribute> </xsl:if>
Line 1146
<!-- Dropdown Arrow --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteArrow(WebWorksRootPath, "<xsl:value-of select="concat('wwdd', $ParamParagraph/@id)" />", <xsl:value-of select="$ParamParagraphBehavior/@dropdown = 'start-open'" />);</html:script> </xsl:if> </xsl:element> </html:td> </html:tr> </html:table> </xsl:when>
Line 1184
<!-- Dropdown Arrow --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteArrow(WebWorksRootPath, "<xsl:value-of select="concat('wwdd', $ParamParagraph/@id)" />", <xsl:value-of select="$ParamParagraphBehavior/@dropdown = 'start-open'" />);</html:script> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:when>
Line 1206
<!-- Dropdown Arrow --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteArrow(WebWorksRootPath, "<xsl:value-of select="concat('wwdd', $ParamParagraph/@id)" />", <xsl:value-of select="$ParamParagraphBehavior/@dropdown = 'start-open'" />);</html:script> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:when>
Line 1230
<!-- Dropdown Arrow --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteArrow(WebWorksRootPath, "<xsl:value-of select="concat('wwdd', $ParamParagraph/@id)" />", <xsl:value-of select="$ParamParagraphBehavior/@dropdown = 'start-open'" />);</html:script> </xsl:if> </xsl:otherwise> </xsl:choose>
Line 1242
<!-- Dropdown Start --> <!-- --> <xsl:if test="($ParamParagraphBehavior/@dropdown = 'start-open') or ($ParamParagraphBehavior/@dropdown = 'start-closed')"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteDIVOpen("<xsl:value-of select="concat('wwdd', $ParamParagraph/@id)" />", <xsl:value-of select="$ParamParagraphBehavior/@dropdown = 'start-open'" />);</html:script> </xsl:if> <!-- Dropdown End --> <!-- --> <xsl:if test="$ParamParagraphBehavior/@dropdown = 'end'"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteDIVClose();</html:script> </xsl:if> </xsl:template>
Line 2592
<!-- Dropdown End --> <!-- --> <xsl:if test="$ParamTableBehavior/@dropdown = 'end'"> <html:script type="text/javascript" language="JavaScript1.2">WebWorks_WriteDIVClose();</html:script> </xsl:if> </xsl:template>
You will probably need to integrate this as a change for the span tag, and also some sort of modification to the JS files.