Changeset 323 for trunk/grails-app/taglib/JsUtilTagLib.groovy
- Timestamp:
- Feb 8, 2010, 3:23:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/JsUtilTagLib.groovy
r322 r323 23 23 * @param openImgUrl The url to apply as the image src when toggled element is visible. 24 24 * @param closedImgUrl The url to apply as the image src when toggled element is hidden. 25 * @param effect The effect to apply, 'fade' uses the fade/appear effect while the default is to just toggle. 25 26 * @param text The text, if any, to display. 26 27 */ … … 28 29 def mkp = new groovy.xml.MarkupBuilder(out) //this line will be unnecessary in versions of Grails after version 1.2 29 30 31 def toggleJs 32 33 // Do we want to fade/appear or just toggle. 34 if(attrs.effect == "fade") 35 toggleJs = js.toggleWithImgAndEffect(attrs.toggleId, attrs.imageId, attrs.openImgUrl, attrs.closedImgUrl) 36 else 37 toggleJs = js.toggleWithImg(attrs.toggleId, attrs.imageId, attrs.openImgUrl, attrs.closedImgUrl) 38 30 39 mkp.div() { 31 a( href: js.toggleWithImg(attrs.toggleId, attrs.imageId, attrs.openImgUrl, attrs.closedImgUrl)) {40 a( href: toggleJs ) { 32 41 yieldUnescaped(attrs.text) 33 42 img(id: attrs.imageId, src: attrs.closedImgUrl, alt: "Show")
Note: See TracChangeset
for help on using the changeset viewer.