Displaying xforms hints as tooltip

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Displaying xforms hints as tooltip

flyingzumwalt
Hi all,

I want to display my xforms hints as tooltips that appear when you hover over the associated control.  With other xforms engines, this seems to be the default, but I can't quite figure out how to do it with OPS without some pretty heavy tinkering.  Does anyone know the easy way to do this?

Thanks,
MZ



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Displaying xforms hints as tooltip

Erik Bruchez
Administrator
MZ,

 > I want to display my xforms hints as tooltips that appear when you
 > hover over the associated control.  With other xforms engines, this
 > seems to be the default, but I can't quite figure out how to do it
 > with OPS without some pretty heavy tinkering.  Does anyone know the
 > easy way to do this?

I fear that there is no "easy" way to do it. Using tooltips for hints
(at least as an option) is on our plate but we haven't implemented
this yet.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Displaying xforms hints as tooltip

Adrian Baker
In reply to this post by flyingzumwalt
In the past I've displayed hints as tooltips on the label by adding some logic to theme.xsl:

    <xsl:template match="xhtml:label[tokenize(@class, ' ') = 'xforms-label']">
        <xsl:copy>
            <xsl:apply-templates select="@*"/>
            <xsl:if test="../../xhtml:label[tokenize(@class, ' ') = 'xforms-hint']">
                <xsl:attribute name="title" select="../../xhtml:label[tokenize(@class, ' ') = 'xforms-hint']/text()"/>
                <xsl:attribute name="class" select="concat(@class, ' hint')"/>
            </xsl:if>
            <xsl:apply-templates select="node()"/>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="xhtml:label[tokenize(@class, ' ') = 'xforms-hint']"/>

This adds a title and an extra 'hint' class to the label so you can style it appropriately (eg help mouse cursor, maybe some sort of highlight to indicate that there's a hint available). So you could take a similar approach to get a tooltip onto the control. The disadvantage is that the hint text must be static because they won't get updated by OPS.

However we're shifting away from doing this because it's very similar to what xforms-help does by default - how about just using xforms-help instead?

Adrian

Erik Bruchez wrote:
MZ,

 > I want to display my xforms hints as tooltips that appear when you
 > hover over the associated control.  With other xforms engines, this
 > seems to be the default, but I can't quite figure out how to do it
 > with OPS without some pretty heavy tinkering.  Does anyone know the
 > easy way to do this?

I fear that there is no "easy" way to do it. Using tooltips for hints
(at least as an option) is on our plate but we haven't implemented
this yet.

-Erik

  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws