Changeset 349 for trunk/grails-app/taglib/dbnp/studycapturing
- Timestamp:
- Apr 19, 2010, 1:05:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r341 r349 212 212 def addExampleElement = attrs.remove('addExampleElement') 213 213 def addExample2Element = attrs.remove('addExample2Element') 214 def helpText = help().trim() 214 215 215 216 // got an ajax onchange action? … … 243 244 out << ' <div class="input">' 244 245 out << renderedElement 245 if (help ()) {246 if (helpText.size() > 0) { 246 247 out << ' <div class="helpIcon"></div>' 247 248 } … … 272 273 273 274 // add help content if it is available 274 if (help ()) {275 if (helpText.size() > 0) { 275 276 out << ' <div class="helpContent">' 276 out << ' ' + help ()277 out << ' ' + helpText 277 278 out << ' </div>' 278 279 } 279 280 280 281 out << '</div>' 282 } 283 284 /** 285 * render an ajaxButtonElement 286 * @param Map attrs 287 * @param Closure body (help text) 288 */ 289 def ajaxButtonElement = { attrs, body -> 290 baseElement.call( 291 'ajaxButton', 292 attrs, 293 body 294 ) 281 295 } 282 296 … … 436 450 } 437 451 452 /** 453 * Ontology form element 454 * @param Map attributes 455 * @param Closure help content 456 */ 457 def ontologyElement = { attrs, body -> 458 // @see http://www.bioontology.org/wiki/index.php/NCBO_Widgets#Term-selection_field_on_a_form 459 // @see ontology-chooser.js, table-editor.js 460 baseElement.call( 461 'textField', 462 [ 463 name: attrs.name, 464 value: attrs.value, 465 description: attrs.description, 466 rel: 'ontology-' + ((attrs.ontology) ? attrs.ontology : 'all') + '-name', 467 size: 25 468 ], 469 body 470 ) 471 out << hiddenField( 472 name: attrs.name + '-concept_id' 473 ) 474 out << hiddenField( 475 name: attrs.name + '-ontology_id' 476 ) 477 out << hiddenField( 478 name: attrs.name + '-full_id' 479 ) 480 } 438 481 439 482 /**
Note: See TracChangeset
for help on using the changeset viewer.