Changeset 54


Ignore:
Timestamp:
Nov 9, 2009, 2:04:00 PM (13 years ago)
Author:
keesvb
Message:

Added fix for postgres problems, refactored JQuery code in tag library

Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/application.properties

    r51 r54  
    11#utf-8
    2 #Fri Nov 06 13:55:45 CET 2009
     2#Mon Nov 09 12:32:00 EST 2009
    33plugins.shiro=1.0.1
    44plugins.mail=0.9
  • trunk/grails-app/conf/DataSource.groovy

    r45 r54  
    3535                         * @see http://wiki.github.com/RobertFischer/autobase/example-usage
    3636                         */
    37                         dbCreate =  "update"
     37                        dbCreate = "update"
    3838                        username = "gscf"
    3939                        password = "dbnp"
     
    4242                        driverClassName = "org.postgresql.Driver"
    4343                        url = "jdbc:postgresql://localhost:5432/gscf"
     44                        dialect = org.hibernate.dialect.PostgreSQLDialect
    4445
    4546                        // MySQL
     47                        //driverClassName = "com.mysql.jdbc.Driver"
    4648                        //url = "jdbc:mysql://localhost/gscf"
     49                        //dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
    4750
    4851                        //In memory
    49                         //driverClassName = "com.mysql.jdbc.Driver"
    5052                        //url = "jdbc:hsqldb:file:prodDb;shutdown=true"
    5153                }
  • trunk/grails-app/conf/NimbleBootStrap.groovy

    r53 r54  
    4646
    4747    // Execute any custom Nimble related BootStrap for your application below
     48    if (nimble.User.count() == 0) {
    4849
    49     // Create example User account
    50     def user = InstanceGenerator.user()
    51     user.username = "user"
    52     user.pass = 'useR123!'
    53     user.passConfirm = 'useR123!'
    54     user.enabled = true
     50        // Create example User account
     51        def user = InstanceGenerator.user()
     52        user.username = "user"
     53        user.pass = 'useR123!'
     54        user.passConfirm = 'useR123!'
     55        user.enabled = true
    5556
    56     def userProfile = InstanceGenerator.profile()
    57     userProfile.fullName = "Test User"
    58     userProfile.owner = user
    59     user.profile = userProfile
     57        def userProfile = InstanceGenerator.profile()
     58        userProfile.fullName = "Test User"
     59        userProfile.owner = user
     60        user.profile = userProfile
    6061
    61     def savedUser = userService.createUser(user)
    62     if (savedUser.hasErrors()) {
    63       savedUser.errors.each {
    64         log.error(it)
    65       }
    66       throw new RuntimeException("Error creating example user")
     62        def savedUser = userService.createUser(user)
     63        if (savedUser.hasErrors()) {
     64          savedUser.errors.each {
     65            log.error(it)
     66          }
     67          throw new RuntimeException("Error creating example user")
     68        }
     69
     70        // Create example Administrative account
     71        def admins = Role.findByName(AdminsService.ADMIN_ROLE)
     72        def admin = InstanceGenerator.user()
     73        admin.username = "admin"
     74        admin.pass = "admiN123!"
     75        admin.passConfirm = "admiN123!"
     76        admin.enabled = true
     77
     78        def adminProfile = InstanceGenerator.profile()
     79        adminProfile.fullName = "Administrator"
     80        adminProfile.owner = admin
     81        admin.profile = adminProfile
     82
     83        def savedAdmin = userService.createUser(admin)
     84        if (savedAdmin.hasErrors()) {
     85          savedAdmin.errors.each {
     86            log.error(it)
     87          }
     88          throw new RuntimeException("Error creating administrator")
     89        }
     90
     91        adminsService.add(admin)
     92
    6793    }
    68 
    69     // Create example Administrative account
    70     def admins = Role.findByName(AdminsService.ADMIN_ROLE)
    71     def admin = InstanceGenerator.user()
    72     admin.username = "admin"
    73     admin.pass = "admiN123!"
    74     admin.passConfirm = "admiN123!"
    75     admin.enabled = true
    76 
    77     def adminProfile = InstanceGenerator.profile()
    78     adminProfile.fullName = "Administrator"
    79     adminProfile.owner = admin
    80     admin.profile = adminProfile
    81 
    82     def savedAdmin = userService.createUser(admin)
    83     if (savedAdmin.hasErrors()) {
    84       savedAdmin.errors.each {
    85         log.error(it)
    86       }
    87       throw new RuntimeException("Error creating administrator")
    88     }
    89 
    90     adminsService.add(admin)
    9194  }
    9295
  • trunk/grails-app/views/layouts/main.gsp

    r52 r54  
    77  <link rel="stylesheet" href="${resource(dir:'css',file:'login_panel.css')}" />
    88  <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
    9   <!--
    10     we'd rather like to use this tag, as this tag uses the proper jquery version
    11     as maintained by the jquery plugin. However, nimble is conflicting at this
    12     moment and tries to fetch jquery from it's plugin resource location (which
    13     you can see in the HTML rendered version of this layout in the nimble views.
    14     So for now we will use the hardcoded javascript tag instead and comment out:
    15     <g:javascript library="jquery" />
    16     @see http://jira.codehaus.org/browse/GRAILSPLUGINS-1658
    17     @see http://github.com/intient/nimble/issues#issue/55
    18   //-->
    19   <script type="text/javascript" src="/gscf/js/jquery/jquery-1.3.2.js"></script>
    20   <!-- /jquery //-->
    21 
     9  <my:jquery/>
    2210  <!-- layouthead //-->
    2311  <g:layoutHead />
  • trunk/grails-app/views/query/index.gsp

    r41 r54  
    33      <title>Generic Study Capture Framework - Query studies</title>
    44      <meta name="layout" content="main" />
    5       <g:javascript library="jquery"/>
    6       <link rel="stylesheet" href="${createLinkTo(dir:'css/jquery-ui', file: 'jquery-ui-1.7.2.custom.css')}"/>
    7       <script src="${createLinkTo(dir: 'js', file: 'jquery-ui-1.7.2.custom.min.js')}" type="text/javascript"></script>
     5      <my:jqueryui/>
    86      <script type="text/javascript">
    97        $(function() {
Note: See TracChangeset for help on using the changeset viewer.