Tooltip Plugin
Dependency:
compile "org.grails.plugins:tooltip:0.8"
Summary
This plugin provides a lightweight and lightning fast tooltip that is very easy to use.
Installation
Add the following to your grails-app/conf/BuildConfig.groovy
grails.project.dependency.resolution = { plugins { compile ':tooltip:0.8' } }
Description
Set default CSSAs of version 0.7 it is possible to change the default CSS file by adding the following line into the application configuration file.In this example the application then will reference to a CSS file with the path: css/tooltip/myTooltipStyles.cssInclude resourcesTo include all needed resources to your page simply put the following line into the GSPs html header.When you want to use your own stylesheet add the attribute stylesheet .Note that there is no .css file ending. The root path to the stylesheet path is <app-home>/web-app/css/tooltipApply tooltipYou have to surround a text or element with the <tooltip:tip> tag to bring up the tooltip. Have a look at the following example.Since version 0.2 there is a better i18n support. Just use the code attribute instead of the value attribute. In the next example the tip-tag will invoke the g.message(code:'some.code') method internally.You can also apply a tooltip with the plain javascript that is generated by the tip-tag. Just have a look at the following example.Revision05 Oct 2013, Version 0.8 - Upgrade to Grails 2.0. code or value attribute nomore mandatory.
05 Mar 2012, Version 0.7 - Grails 2.0 compatibility check. Default tooltip CSS configurable.
16 Mar 2010, Version 0.6 - Grails upgrade
13 Dec 2009, Version 0.5 - Licence changed to Apache 2.0, Grails upgrade
01 Jun 2009, Version 0.4 - Grails upgrade
29 Mar 2009, Version 0.3 - Bugfix, Custom stylesheets
08 Mar 2009, Version 0.2 - I18n support
01 Mar 2009, Version 0.1 - Initial release
tooltip.defaultStyle="myTooltipStyles"
<tooltip:resources/>
<tooltip:resources stylesheet="myTooltipStyles"/>
<tooltip:tip value="some tooltip text">
element that shows the tooltip
</tooltip:tip>
<tooltip:tip code="some.code">
element that shows the tooltip
</tooltip:tip>
<tr onmouseover="tooltip.show('some tooltip text');" onmouseout="tooltip.hide();"> <td>some</td> <td>data</td> </tr>
05 Mar 2012, Version 0.7 - Grails 2.0 compatibility check. Default tooltip CSS configurable.
16 Mar 2010, Version 0.6 - Grails upgrade
13 Dec 2009, Version 0.5 - Licence changed to Apache 2.0, Grails upgrade
01 Jun 2009, Version 0.4 - Grails upgrade
29 Mar 2009, Version 0.3 - Bugfix, Custom stylesheets
08 Mar 2009, Version 0.2 - I18n support
01 Mar 2009, Version 0.1 - Initial release