Changeset 568 for trunk/grails-app/taglib
- Timestamp:
- Jun 4, 2010, 11:45:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/JsUtilTagLib.groovy
r323 r568 25 25 * @param effect The effect to apply, 'fade' uses the fade/appear effect while the default is to just toggle. 26 26 * @param text The text, if any, to display. 27 * @param useDiv Whether or not to use a wrapping div, default is 'true'. 27 28 */ 28 29 def toggleControl = { attrs -> … … 37 38 toggleJs = js.toggleWithImg(attrs.toggleId, attrs.imageId, attrs.openImgUrl, attrs.closedImgUrl) 38 39 39 mkp.div() { 40 a( href: toggleJs ) { 41 yieldUnescaped(attrs.text) 42 img(id: attrs.imageId, src: attrs.closedImgUrl, alt: "Show") 43 } 44 } // mkp 40 if(attrs.useDiv == 'false') { 41 mkp.a( href: toggleJs ) { 42 yieldUnescaped(attrs.text) 43 img(id: attrs.imageId, src: attrs.closedImgUrl, alt: "Show") 44 } // mkp 45 46 } 47 else { 48 mkp.div() { 49 a( href: toggleJs ) { 50 yieldUnescaped(attrs.text) 51 img(id: attrs.imageId, src: attrs.closedImgUrl, alt: "Show") 52 } 53 } // mkp 54 } 45 55 46 56 } // hideShowControl
Note: See TracChangeset
for help on using the changeset viewer.