- Timestamp:
- Feb 5, 2010, 9:44:46 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/AssetTreeService.groovy
r312 r317 10 10 11 11 def buttonHtmlClass() { 12 "tree_button"12 'tree_button' 13 13 } 14 14 def paneHtmlClass() { … … 29 29 def tableLoadingImgId() { 30 30 'assetTreeLoadingImg' 31 } 32 33 /** Name and Description Formatting */ 34 35 def name(obj) { 36 obj.name.encodeAsHTML() 37 } 38 39 def description(obj) { 40 def s = obj.description.encodeAsHTML() 41 if(s) s = ' -- ' + s 42 else '' 31 43 } 32 44 … … 127 139 img(src: dashImg()) 128 140 a( href: siteShowLink(site.id), onclick: onclickHideAndSavePane() ) { 129 yieldUnescaped( site.encodeAsHTML())141 yieldUnescaped( name(site) ) 130 142 } 143 yieldUnescaped( description(site) ) 131 144 a(href: sectionCreateLink(site.id), onclick: onclickHideAndSavePane()) { 132 145 img(src: addImg(), alt: 'Add', title: 'Add Section') … … 146 159 img(src: dashImg()) 147 160 a( href: sectionShowLink(section.id), onclick: onclickHideAndSavePane() ) { 148 yieldUnescaped( section.encodeAsHTML() )161 yieldUnescaped( name(section) ) 149 162 } 163 yieldUnescaped( description(section) ) 150 164 a(href: assetCreateLink(section.id), onclick: onclickHideAndSavePane()) { 151 165 img(src: addImg(), alt: 'Add', title: 'Add Asset') … … 166 180 img(src: dashImg()) 167 181 a( href: assetShowLink(asset.id), onclick: onclickHideAndSavePane() ) { 168 yieldUnescaped( asset.encodeAsHTML() )182 yieldUnescaped( name(asset) ) 169 183 } 184 yieldUnescaped( description(asset) ) 170 185 a(href: assetSubItemCreateLink(asset.id), onclick: onclickHideAndSavePane()) { 171 186 img(src: addImg(), alt: 'Add', title: 'Add Sub Item') … … 189 204 img(src: dashImg()) 190 205 a( href: assetSubItemShowLink(assetSubItemL1.id), onclick: onclickHideAndSavePane() ) { 191 yieldUnescaped( assetSubItemL1.encodeAsHTML() )206 yieldUnescaped( name(assetSubItemL1) ) 192 207 } 208 yieldUnescaped( description(assetSubItemL1) ) 193 209 a(href: assetSubItemCreateWithParentLink(assetSubItemL1.id), onclick: onclickHideAndSavePane()) { 194 210 img(src: addImg(), alt: 'Add', title: 'Add Sub Item') … … 209 225 img(src: dashImg()) 210 226 a( href: assetSubItemShowLink(assetSubItemL2.id), onclick: onclickHideAndSavePane() ) { 211 yieldUnescaped( assetSubItemL2.encodeAsHTML() )227 yieldUnescaped( name(assetSubItemL2) ) 212 228 } 229 yieldUnescaped( description(assetSubItemL2) ) 213 230 a(href: assetSubItemCreateWithParentLink(assetSubItemL2.id), onclick: onclickHideAndSavePane()) { 214 231 img(src: addImg(), alt: 'Add', title: 'Add Sub Item') … … 229 246 img(src: dashImg()) 230 247 a( href: assetSubItemShowLink(assetSubItemL3.id), onclick: onclickHideAndSavePane() ) { 231 yieldUnescaped( assetSubItemL3.encodeAsHTML() )248 yieldUnescaped( name(assetSubItemL3) ) 232 249 } 250 yieldUnescaped( description(assetSubItemL3) ) 233 251 a(href: assetSubItemCreateWithParentLink(assetSubItemL3.id), onclick: onclickHideAndSavePane()) { 234 252 img(src: addImg(), alt: 'Add', title: 'Add Sub Item') … … 249 267 img(src: dashImg()) 250 268 a( href: assetSubItemShowLink(assetSubItemL4.id), onclick: onclickHideAndSavePane() ) { 251 yieldUnescaped( assetSubItemL4.encodeAsHTML() )269 yieldUnescaped( name(assetSubItemL4) ) 252 270 } 271 yieldUnescaped( description(assetSubItemL4) ) 253 272 // a(href: assetSubItemCreateWithParentLink(assetSubItemL4.id), onclick: onclickHideAndSavePane()) { 254 273 // img(src: addImg(), alt: 'Add', title: 'Add Sub Item')
Note: See TracChangeset
for help on using the changeset viewer.