Changeset 568
- Timestamp:
- Jun 4, 2010, 11:45:14 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 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 -
trunk/web-app/js/jsUtil.js
r358 r568 24 24 } 25 25 26 function toggleWithEffectUtil(id) { 27 if( $(id).visible() ) { 28 Effect.Fade(id,{duration:0.4,queue:'end'}); 29 } 30 else { 31 Effect.Appear(id,{duration:0.4,queue:'end'}); 32 } 33 } 34 26 35 function toggleWithImgAndEffectUtil(id, imageId, openImgUrl, closedImgUrl) { 27 36
Note: See TracChangeset
for help on using the changeset viewer.