Changeset 367
- Timestamp:
- Apr 21, 2010, 5:26:21 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 52 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r366 r367 303 303 304 304 // Human sample template 305 /* COMMENTED OUT AS IT BREAKS THE WHOLE LOT 305 306 def humanSampleTemplate = new Template( 306 307 name: 'Human tissue sample', entity: dbnp.studycapturing.Sample) … … 362 363 363 364 364 /*365 365 //events 366 366 def eventDiet = new EventDescription( … … 403 403 404 404 println('Adding PPS3 study...') 405 */ 405 406 406 // studies 407 407 def exampleStudy = new Study( … … 425 425 ).with { if (!validate()) { errors.each { println it} } else save()} 426 426 427 /*def evLF = new Event(427 def evLF = new Event( 428 428 startTime: Date.parse('yyyy-MM-dd','2008-01-07'), 429 429 endTime: Date.parse('yyyy-MM-dd','2008-01-14'), -
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r359 r367 155 155 }.to "subjects" 156 156 on("add") { 157 println params158 157 flash.values = params 159 /* 160 // fetch species by name (as posted by the form) 161 def speciesTerm = Term.findByName(params.addSpecies) 162 def subjectTemplateName = params.get('template') 163 def subjectTemplate = Template.findByName(subjectTemplateName) 158 def speciesTerm = Term.findByName(params.species); 159 def subjectTemplateName = params.get('template'); 160 def subjectTemplate = Template.findByName(subjectTemplateName); 164 161 165 162 // add this subject template to the subject template array … … 172 169 } 173 170 174 // add x subject of species y171 // add x subjects of species y 175 172 (params.addNumber as int).times { 176 173 def increment = flow.subjects.size() … … 188 185 flow.subjectTemplates[ subjectTemplateName ]['subjects'][ subjectsSize ] = increment 189 186 } 190 */191 187 }.to "subjects" 192 188 on("next") { -
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r359 r367 472 472 473 473 /** 474 * Template form element475 * @param Map attributes476 * @param Closure help content477 */478 def speciesElement = {attrs, body ->479 // render template element480 baseElement.call(481 'speciesSelect',482 attrs,483 body484 )485 }486 487 /**488 * render a species select element489 * @param Map attrs490 */491 def speciesSelect = {attrs ->492 // fetch the speciesOntology493 // note that this is a bit nasty, probably the ontologyName should494 // be configured in a configuration file... --> TODO: centralize species configuration495 def speciesOntology = Ontology.findByName('NCBI Taxonomy')496 497 // fetch all species498 attrs.from = Term.findAllByOntology(speciesOntology)499 500 // got a name?501 if (!attrs.name) {502 // nope, use a default name503 attrs.name = 'species'504 }505 506 out << select(attrs)507 }508 509 /**510 474 * Ontology form element 511 475 * @param Map attributes … … 551 515 } 552 516 553 554 517 /** 555 518 * render a study select element … … 581 544 */ 582 545 def templateElement = {attrs, body -> 546 // add a rel element if it does not exist 547 if (!attrs.rel) { 548 attrs.rel = 'template' 549 } 550 583 551 // render template element 584 552 baseElement.call( -
trunk/grails-app/views/common/_feedback.gsp
r359 r367 16 16 }); 17 17 </script> 18 <img id="add_feedback" src="${resource(dir: 'images', file: 'icons/famfamfam/ comment_add.png')}" style="cursor: pointer;" alt="submit feedback for this page" />18 <img id="add_feedback" src="${resource(dir: 'images', file: 'icons/famfamfam/bug_add.png')}" style="cursor: pointer;" alt="submit feedback for this page" /> 19 19 <div class="feedback" id="feedback"> 20 20 <form> -
trunk/grails-app/views/wizard/pages/_subjects.gsp
r359 r367 55 55 <div class="column"><g:textField name="subject_${subjectId}_name" value="${subjects[ subjectId ].name}" size="12" maxlength="12" /></div> 56 56 <div class="column"> 57 <wizard: speciesSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" />57 <wizard:termSelect value="${subjects[ subjectId ].species}" name="subject_${subjectId}_species" ontology="1132" /> 58 58 </div> 59 59 <wizard:templateColumns id="${subjectId}" template="${subjects[ subjectId ].template}" name="subject_${subjectId}" class="column" subject="${subjects[ subjectId ]}" /> -
trunk/web-app/css/default_style.css
r365 r367 260 260 font-weight: bold; 261 261 } 262 option.modify { 263 background: url(../images/icons/famfamfam/layout_add.png) no-repeat left top; 264 background-color: #333; 265 padding-left: 18px; 266 height: 16px; 267 color: #fff; 268 font-weight: bold; 269 } 262 270 option.locked { 263 271 background: url(../images/icons/famfamfam/lock.png) no-repeat left top; -
trunk/web-app/js/wizard.js
r365 r367 54 54 label : 'add more...', 55 55 class : 'addMore', 56 onClose : function(scope) { 57 refreshWebFlow(); 58 } 59 }); 60 61 // handle template selects 62 new SelectAddMore().init({ 63 rel : 'template', 64 url : '/gscf/templateEditor', 65 label : 'add / modify..', 66 class : 'modify', 56 67 onClose : function(scope) { 57 68 refreshWebFlow();
Note: See TracChangeset
for help on using the changeset viewer.