Changeset 92


Ignore:
Timestamp:
Jan 19, 2010, 2:25:45 PM (8 years ago)
Author:
duh
Message:
  • added sample template data in bootstrap
  • upgraded jQuery
  • improved study capture wizard
  • fixed selenium test
Location:
trunk
Files:
9 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/application.properties

    r91 r92  
    11#Grails Metadata file
    2 #Tue Jan 19 09:09:51 CET 2010
     2#Tue Jan 19 11:00:58 CET 2010
    33app.grails.version=1.2.0
    44app.name=gscf
     
    88plugins.db-util=0.4
    99plugins.hibernate=1.2.0
    10 plugins.jquery=1.3.2.4
     10plugins.jquery=1.4.0.1
    1111plugins.mail=0.9
    1212plugins.nimble=0.3-SNAPSHOT
    13 plugins.richui=0.7
    1413plugins.shiro=1.0.1
    1514plugins.tomcat=1.2.0
  • trunk/grails-app/conf/BootStrap.groovy

    r34 r92  
    11import org.codehaus.groovy.grails.commons.GrailsApplication
    22import grails.util.GrailsUtil
     3import dbnp.studycapturing.*
     4import intient.nimble.InstanceGenerator
    35
    46/**
    57 * Application Bootstrapper
    6  * @Author  Jeroen Wesbeek
    7  * @Since   20091021
     8 * @Author Jeroen Wesbeek
     9 * @Since 20091021
    810 *
    911 * Revision information:
     
    1315 */
    1416class BootStrap {
    15      def init = { servletContext ->     
    16          // check if we're in development
    17          if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
    18              printf("development bootstrapping....\n\n");
    19              
    20          }
    21      }
    22      def destroy = {
    23      }
     17        def init = {servletContext ->
     18                if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
     19                        printf("development bootstrapping....\n\n");
     20
     21                        // ontologies
     22                        def speciesOntology = new Ontology(
     23                                name: 'Species',
     24                                shortName: 'Species',
     25                                url: 'http://www.obofoundry.org/cgi-bin/detail.cgi?id=ncbi_taxonomy'
     26                        ).save()
     27
     28                        // terms
     29                        def mouseTerm = new Term(
     30                                name: 'Mus musculus',
     31                                ontology: speciesOntology,
     32                                accession: '10090'
     33                        ).save()
     34                        def humanTerm = new Term(
     35                                name: 'Homo sapiens',
     36                                ontology: speciesOntology,
     37                                accession: '9606'
     38                        ).save()
     39
     40                        // create system user
     41                        /*
     42                        def systemUser = userService.createUser(InstanceGenerator.user(
     43                                username: 'system',
     44                                pass: 'system',
     45                                passConfirm: 'system',
     46                                enabled: true
     47                        ))
     48                        */
     49
     50                        // define template fields
     51                        def genotypeTemplateField = new TemplateSubjectField(
     52                                name: 'Genotype',
     53                                type: TemplateFieldType.STRINGLIST
     54                        ).save()
     55
     56                        // Mouse template
     57                        def mouseTemplate = new Template(
     58                                name: 'Mouse'
     59                        ).addToSubjectFields(genotypeTemplateField).save()
     60                }
     61        }
     62
     63        def destroy = {
     64        }
    2465}
  • trunk/grails-app/conf/NimbleBootStrap.groovy

    r54 r92  
    4747    // Execute any custom Nimble related BootStrap for your application below
    4848    if (nimble.User.count() == 0) {
     49        println ".bootstrapping nimble"
    4950
    5051        // Create example User account
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r85 r92  
    55 */
    66class Study {
     7        nimble.User owner
     8        String title
     9        String code
     10        String researchQuestion
     11        String description
     12        String ecCode
     13        Date dateCreated
     14        Date lastUpdated
     15        Date startDate
     16        Template template
    717
    8     nimble.User owner
    9     String title
    10     String code
    11     String researchQuestion
    12     String description
    13     String ecCode
    14     Date dateCreated
    15     Date lastUpdated
    16     Date startDate
    17     Template template
     18        static hasMany = [editors: nimble.User, readers: nimble.User,
     19                subjects: Subject, groups: SubjectGroup,
     20                events: Event, samplingEvents: SamplingEvent]
    1821
    19     static hasMany = [ editors : nimble.User, readers : nimble.User,
    20             subjects: Subject, groups : SubjectGroup,
    21             events: Event, samplingEvents : SamplingEvent]
     22        static constraints = {
     23                //template(nullable:true,blank:true)
     24        }
    2225
    23     static constraints = {
    24         template(nullable:true,blank:true)
    25     }
    26 
    27     static mapping = {
    28         researchQuestion type:'text'
    29         description type:'text'
    30     }
    31 
     26        static mapping = {
     27                researchQuestion type: 'text'
     28                description type: 'text'
     29        }
    3230}
  • trunk/grails-app/domain/dbnp/studycapturing/Template.groovy

    r84 r92  
    99
    1010    String name
    11     nimble.User owner
     11    //nimble.User owner
    1212
    1313    static hasMany = [subjectFields : TemplateSubjectField]
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy

    r84 r92  
    55 */
    66abstract class TemplateField {
    7 
    87    String name
    98    TemplateFieldType type
    10  
    119
    1210    static constraints = {
    1311    }
     12
     13        def String toString() {
     14                return name
     15        }
    1416}
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateSubjectField.groovy

    r84 r92  
    55 */
    66class TemplateSubjectField extends TemplateField {
     7        static constraints = {
     8        }
    79
    8     static constraints = {
    9     }
     10        def String toString() {
     11                super.toString()
     12        }
    1013}
  • trunk/grails-app/domain/dbnp/studycapturing/Term.groovy

    r84 r92  
    1414    static constraints = {
    1515    }
     16
     17  def String toString() {
     18    return name
     19  }
     20
     21
    1622}
  • trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy

    r90 r92  
    3131   * <wizard:ajaxButton name="myAction" value="myButton ... />
    3232   *
     33   * @see   http://blog.osx.eu/2010/01/18/ajaxifying-a-grails-webflow/
    3334   * @see   http://www.grails.org/WebFlow
    3435   * @see   http://www.grails.org/Tag+-+submitToRemote
  • trunk/grails-app/views/common/_jquerysetup.gsp

    r54 r92  
    1010  @see http://github.com/intient/nimble/issues#issue/55
    1111//-->
    12 <script type="text/javascript" src="/gscf/js/jquery/jquery-1.3.2.js"></script>
     12<script type="text/javascript" src="/gscf/js/jquery/jquery-1.4.js"></script>
  • trunk/grails-app/views/wizard/pages/_one.gsp

    r90 r92  
    1616%>
    1717<wizard:pageContent>
    18 <wizard:textFieldElement name="myZero" value="12" help="some help text" maxlength="4">more than four?</wizard:textFieldElement>
    19 <wizard:textFieldElement name="myFirstName" value="my value" help="my help">Please fill in you name bla bla bla</wizard:textFieldElement>
    20 <wizard:textFieldElement name="mySecondName" value="1234" size="4">another text field</wizard:textFieldElement>
    21 <wizard:textFieldElement name="myThirdName" value="a lotta description" help="so much for help">
    22   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pretium dignissim tellus, id pharetra erat tempus sed. Sed bibendum libero eu lorem pretium nec fermentum ligula faucibus. Morbi gravida interdum ornare. Praesent lectus mi, ullamcorper nec semper nec, vulputate ornare elit. Nam eros metus, egestas a varius eget, facilisis ac purus. Maecenas lectus erat, rutrum id consequat ac, scelerisque ut diam. Donec euismod, tellus facilisis semper elementum, neque lorem volutpat ante, ac consectetur lectus ante sit amet neque. Donec hendrerit, libero quis suscipit iaculis, lacus ligula viverra nibh, eu condimentum diam dui sit amet quam. Praesent turpis orci, laoreet sodales adipiscing eget, ultrices at augue. Nullam sed dolor a velit posuere euismod. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut libero mauris, fermentum id congue sit amet, pharetra in purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a blandit quam. Cras porta tempus lectus, vel varius lacus vulputate in. Aenean ac nunc lectus, hendrerit tempor elit. Sed ut varius diam.
    23 </wizard:textFieldElement>
     18        <wizard:textFieldElement name="studyTitle" help="The title of the study you are creating">Title</wizard:textFieldElement>
     19        <wizard:textFieldElement name="studyCode" help="A code to reference your study by">Code</wizard:textFieldElement>
     20        <wizard:textFieldElement name="studyResearchQuestion" help="The research question">Research Question</wizard:textFieldElement>
     21        <wizard:textFieldElement name="studyDescription">Description</wizard:textFieldElement>
     22        <wizard:textFieldElement name="studyEcCode">Ethical Committee Code</wizard:textFieldElement>
    2423</wizard:pageContent>
  • trunk/grails-app/views/wizard/pages/_three.gsp

    r88 r92  
    1616%>
    1717<wizard:pageContent>
    18   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ut metus nisi, eget tincidunt enim. Vivamus in nulla est, sed viverra odio. Praesent venenatis hendrerit ipsum, id tristique enim fringilla sed. Duis diam magna, accumsan at sodales a, rutrum et leo. Sed non metus non odio tristique malesuada blandit sed velit. Aenean pulvinar nisi eu augue gravida id malesuada velit lobortis. Nulla facilisi. In sit amet urna quis lorem eleifend venenatis. Duis eu sem sed nulla rutrum sodales eu ac lorem. Nam a pellentesque tortor. Pellentesque tincidunt sollicitudin odio, id condimentum leo condimentum aliquam. Aliquam tincidunt faucibus elit, sit amet interdum justo vestibulum quis. Praesent ac sagittis nunc. Nulla eu lacus id mauris laoreet vehicula. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
    19 
    20   <p>Quisque suscipit dictum velit, tempus pharetra elit cursus eget. Mauris pulvinar libero bibendum tortor tristique ut suscipit ante vestibulum. Integer dignissim sagittis mi, nec tincidunt dui posuere ac. Vivamus risus turpis, blandit at dictum in, scelerisque in nibh. Mauris ac erat vel purus pellentesque ullamcorper et ac nulla. Integer ante arcu, ornare sit amet sodales eget, lacinia vitae dolor. Pellentesque dignissim odio at nisl hendrerit euismod. Duis at eros erat, id congue tortor. Donec commodo, eros at ullamcorper tincidunt, arcu est vehicula mauris, quis imperdiet magna elit sit amet massa. Maecenas suscipit, leo a fermentum mollis, nulla nulla pretium enim, et auctor risus lectus sed tortor.</p>
    21 
    22   <p>Donec tempor feugiat ullamcorper. Sed viverra leo a nisi ornare id posuere urna laoreet. Curabitur a est leo, a luctus libero. Mauris dapibus feugiat sodales. Duis sollicitudin dui eget erat ullamcorper et mattis leo euismod. Aliquam dapibus egestas tortor a vehicula. Proin ut nisi justo, et volutpat orci. Vestibulum elementum eleifend nibh eu blandit. Vivamus at enim id magna iaculis commodo. Integer sagittis malesuada risus, at rutrum elit volutpat in. Morbi faucibus quam vitae arcu pharetra egestas. Pellentesque ac est ornare lacus tempus lobortis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. </p>
     18<wizard:textFieldElement name="myZero" value="12" help="some help text" maxlength="4">more than four?</wizard:textFieldElement>
     19<wizard:textFieldElement name="myFirstName" value="my value" help="my help">Please fill in you name bla bla bla</wizard:textFieldElement>
     20<wizard:textFieldElement name="mySecondName" value="1234" size="4">another text field</wizard:textFieldElement>
     21<wizard:textFieldElement name="myThirdName" value="a lotta description" help="so much for help">
     22  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pretium dignissim tellus, id pharetra erat tempus sed. Sed bibendum libero eu lorem pretium nec fermentum ligula faucibus. Morbi gravida interdum ornare. Praesent lectus mi, ullamcorper nec semper nec, vulputate ornare elit. Nam eros metus, egestas a varius eget, facilisis ac purus. Maecenas lectus erat, rutrum id consequat ac, scelerisque ut diam. Donec euismod, tellus facilisis semper elementum, neque lorem volutpat ante, ac consectetur lectus ante sit amet neque. Donec hendrerit, libero quis suscipit iaculis, lacus ligula viverra nibh, eu condimentum diam dui sit amet quam. Praesent turpis orci, laoreet sodales adipiscing eget, ultrices at augue. Nullam sed dolor a velit posuere euismod. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut libero mauris, fermentum id congue sit amet, pharetra in purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a blandit quam. Cras porta tempus lectus, vel varius lacus vulputate in. Aenean ac nunc lectus, hendrerit tempor elit. Sed ut varius diam.
     23</wizard:textFieldElement>
    2324</wizard:pageContent>
  • trunk/tests/create_protocol_parameter

    r81 r92  
    3939<tr>
    4040        <td>click</td>
    41         <td>//div[@id='header']/ul/li[5]/span</td>
     41        <td>//div[@id='header']/ul/li[6]/span</td>
    4242        <td></td>
    4343</tr>
     
    7474<tr>
    7575        <td>click</td>
    76         <td>//div[@id='header']/ul/li[5]/span</td>
     76        <td>//div[@id='header']/ul/li[6]/span</td>
    7777        <td></td>
    7878</tr>
     
    104104<tr>
    105105        <td>click</td>
    106         <td>//div[@id='header']/ul/li[5]/span</td>
     106        <td>//div[@id='header']/ul/li[6]/span</td>
    107107        <td></td>
    108108</tr>
     
    129129<tr>
    130130        <td>click</td>
    131         <td>//div[@id='header']/ul/li[5]/span</td>
     131        <td>//div[@id='header']/ul/li[6]/span</td>
    132132        <td></td>
    133133</tr>
Note: See TracChangeset for help on using the changeset viewer.