diff --git a/application.properties b/application.properties index 477e7e8..9c61511 100644 --- a/application.properties +++ b/application.properties @@ -1,10 +1,10 @@ #Grails Metadata file -#Mon Oct 17 19:38:47 EDT 2011 -app.grails.version=1.3.7 +#Thu Mar 08 22:00:21 EST 2012 +app.grails.version=2.0.1 app.name=openmentor-web app.servlet.version=2.4 app.version=0.1 -plugins.hibernate=1.3.7 +plugins.hibernate=2.0.1 plugins.spring-security-core=1.2.1 plugins.spring-security-ldap=1.0.5 -plugins.tomcat=1.3.7 +plugins.tomcat=2.0.1 diff --git a/grails-app/conf/Config.groovy b/grails-app/conf/Config.groovy index abd6082..70f6e82 100644 --- a/grails-app/conf/Config.groovy +++ b/grails-app/conf/Config.groovy @@ -79,7 +79,7 @@ log4j = { } debug 'grails.app.controller', - 'grails.app.domain' + 'grails.app.domain' error 'org.codehaus.groovy.grails.web.servlet', // controllers 'org.codehaus.groovy.grails.web.pages', // GSP @@ -107,6 +107,18 @@ grails.plugins.springsecurity.userLookup.userDomainClassName = 'uk.org.openmento grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'uk.org.openmentor.auth.UserRole' grails.plugins.springsecurity.authority.className = 'uk.org.openmentor.auth.Role' +// Added for the Spring Security LDAP plugin: +//grails.plugins.springsecurity.ldap.context.managerDn = 'uid=admin,ou=system' +//grails.plugins.springsecurity.ldap.context.managerPassword = 'secret' +grails.plugins.springsecurity.ldap.context.anonymousReadOnly=true +grails.plugins.springsecurity.ldap.context.server = 'ldap://localhost:1389/' +grails.plugins.springsecurity.ldap.search.base = 'dc=example,dc=com' +grails.plugins.springsecurity.ldap.search.filter = '(uid={0})' +grails.plugins.springsecurity.ldap.authorities.groupSearchBase = 'ou=Groups,dc=example,dc=com' +grails.plugins.springsecurity.ldap.authorities.groupSearchFilter = 'uniqueMember={0}' +//grails.plugins.springsecurity.password.algorithm = 'SHA-256' +grails.plugins.springsecurity.ldap.authorities.retrieveDatabaseRoles = true + // This exploits the significantly more flexible handling of types in Grails to // allow configuration down to the grading scheme. openmentor { diff --git a/grails-app/conf/DataSource.groovy b/grails-app/conf/DataSource.groovy index 3d03a00..4204dce 100644 --- a/grails-app/conf/DataSource.groovy +++ b/grails-app/conf/DataSource.groovy @@ -1,6 +1,6 @@ dataSource { pooled = true - driverClassName = "org.hsqldb.jdbcDriver" + driverClassName = "org.h2.Driver" username = "sa" password = "" } @@ -16,13 +16,13 @@ environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' - url = "jdbc:hsqldb:mem:devDB" + url = "jdbc:h2:mem:devDB" } } test { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' - url = "jdbc:hsqldb:mem:testDB" + url = "jdbc:h2:mem:testDB" } } staging { diff --git a/pom.xml b/pom.xml index ece65d0..b0185f7 100644 --- a/pom.xml +++ b/pom.xml @@ -263,13 +263,6 @@ - - - hsqldb - hsqldb - 1.8.0.10 - - org.slf4j diff --git a/web-app/WEB-INF/applicationContext.xml b/web-app/WEB-INF/applicationContext.xml index 6f42796..69fbef3 100644 --- a/web-app/WEB-INF/applicationContext.xml +++ b/web-app/WEB-INF/applicationContext.xml @@ -6,37 +6,28 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem Grails application factory bean - - + + A bean that manages Grails plugins - - + + - - - - - - + + + + + + - - - + - - - classpath*:**/grails-app/**/*.groovy - - - - - - utf-8 - - + + + utf-8 + + \ No newline at end of file diff --git a/web-app/WEB-INF/sitemesh.xml b/web-app/WEB-INF/sitemesh.xml index a547b41..72399ce 100644 --- a/web-app/WEB-INF/sitemesh.xml +++ b/web-app/WEB-INF/sitemesh.xml @@ -5,7 +5,7 @@ + class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" /> diff --git a/web-app/WEB-INF/tld/c.tld b/web-app/WEB-INF/tld/c.tld index 22698c9..5e18236 100644 --- a/web-app/WEB-INF/tld/c.tld +++ b/web-app/WEB-INF/tld/c.tld @@ -1,13 +1,13 @@ - - - JSTL 1.1 core library + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" + version="2.1"> + + JSTL 1.2 core library JSTL core - 1.1 + 1.2 c http://java.sun.com/jsp/jstl/core @@ -74,7 +74,7 @@ not the body content should be processed. Name of the exported scoped variable for the resulting value of the test condition. The type -of the scoped variable is Boolean. +of the scoped variable is Boolean. var false @@ -174,6 +174,9 @@ Collection of items to iterate over. false true java.lang.Object + + java.lang.Object + @@ -253,6 +256,9 @@ String of tokens to iterate over. true true java.lang.String + + java.lang.String + @@ -322,7 +328,7 @@ visibility. Like <%= ... >, but for expressions. - + out org.apache.taglibs.standard.tag.rt.core.OutTag JSP @@ -467,6 +473,9 @@ Expression to be evaluated. value false true + + java.lang.Object + diff --git a/web-app/WEB-INF/tld/fmt.tld b/web-app/WEB-INF/tld/fmt.tld index 3b9a54a..2ae4776 100644 --- a/web-app/WEB-INF/tld/fmt.tld +++ b/web-app/WEB-INF/tld/fmt.tld @@ -1,13 +1,13 @@ - - - JSTL 1.1 i18n-capable formatting library + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" + version="2.1"> + + JSTL 1.2 i18n-capable formatting library JSTL fmt - 1.1 + 1.2 fmt http://java.sun.com/jsp/jstl/fmt @@ -55,7 +55,7 @@ and may contain a two-letter (upper-case) country code (as defined by ISO-3166). Language and country codes must be separated by hyphen (-) or underscore -(_). +(_). value true @@ -496,7 +496,7 @@ Date and/or time to be formatted. Specifies whether the time, the date, or both the time and date components of the given -date are to be formatted. +date are to be formatted. type false diff --git a/web-app/css/errors.css b/web-app/css/errors.css new file mode 100644 index 0000000..bdb58bc --- /dev/null +++ b/web-app/css/errors.css @@ -0,0 +1,109 @@ +h1, h2 { + margin: 10px 25px 5px; +} + +h2 { + font-size: 1.1em; +} + +.filename { + font-style: italic; +} + +.exceptionMessage { + margin: 10px; + border: 1px solid #000; + padding: 5px; + background-color: #E9E9E9; +} + +.stack, +.snippet { + margin: 0 25px 10px; +} + +.stack, +.snippet { + border: 1px solid #ccc; + -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); + box-shadow: 0 0 2px rgba(0,0,0,0.2); +} + +/* error details */ +.error-details { + border-top: 1px solid #FFAAAA; + -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); + box-shadow: 0 0 2px rgba(0,0,0,0.2); + border-bottom: 1px solid #FFAAAA; + -mox-box-shadow: 0 0 2px rgba(0,0,0,0.2); + -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); + box-shadow: 0 0 2px rgba(0,0,0,0.2); + background-color:#FFF3F3; + line-height: 1.5; + overflow: hidden; + padding: 5px; + padding-left:25px; +} + +.error-details dt { + clear: left; + float: left; + font-weight: bold; + margin-right: 5px; +} + +.error-details dt:after { + content: ":"; +} + +.error-details dd { + display: block; +} + +/* stack trace */ +.stack { + padding: 5px; + overflow: auto; + height: 150px; +} + +/* code snippet */ +.snippet { + background-color: #fff; + font-family: monospace; +} + +.snippet .line { + display: block; +} + +.snippet .lineNumber { + background-color: #ddd; + color: #999; + display: inline-block; + margin-right: 5px; + padding: 0 3px; + text-align: right; + width: 3em; +} + +.snippet .error { + background-color: #fff3f3; + font-weight: bold; +} + +.snippet .error .lineNumber { + background-color: #faa; + color: #333; + font-weight: bold; +} + +.snippet .line:first-child .lineNumber { + padding-top: 5px; +} + +.snippet .line:last-child .lineNumber { + padding-bottom: 5px; +} \ No newline at end of file diff --git a/web-app/css/mobile.css b/web-app/css/mobile.css new file mode 100644 index 0000000..167f502 --- /dev/null +++ b/web-app/css/mobile.css @@ -0,0 +1,82 @@ +/* Styles for mobile devices */ + +@media screen and (max-width: 480px) { + .nav { + padding: 0.5em; + } + + .nav li { + margin: 0 0.5em 0 0; + padding: 0.25em; + } + + /* Hide individual steps in pagination, just have next & previous */ + .pagination .step, .pagination .currentStep { + display: none; + } + + .pagination .prevLink { + float: left; + } + + .pagination .nextLink { + float: right; + } + + /* pagination needs to wrap around floated buttons */ + .pagination { + overflow: hidden; + } + + /* slightly smaller margin around content body */ + fieldset, + .property-list { + padding: 0.3em 1em 1em; + } + + input, textarea { + width: 100%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + } + + select, input[type=checkbox], input[type=radio], input[type=submit], input[type=button], input[type=reset] { + width: auto; + } + + /* hide all but the first column of list tables */ + .scaffold-list td:not(:first-child), + .scaffold-list th:not(:first-child) { + display: none; + } + + .scaffold-list thead th { + text-align: center; + } + + /* stack form elements */ + .fieldcontain { + margin-top: 0.6em; + } + + .fieldcontain label, + .fieldcontain .property-label, + .fieldcontain .property-value { + display: block; + float: none; + margin: 0 0 0.25em 0; + text-align: left; + width: auto; + } + + .errors ul, + .message p { + margin: 0.5em; + } + + .error ul { + margin-left: 0; + } +} diff --git a/web-app/images/apple-touch-icon-retina.png b/web-app/images/apple-touch-icon-retina.png new file mode 100644 index 0000000..5cc83ed Binary files /dev/null and b/web-app/images/apple-touch-icon-retina.png differ diff --git a/web-app/images/apple-touch-icon.png b/web-app/images/apple-touch-icon.png new file mode 100644 index 0000000..aba337f Binary files /dev/null and b/web-app/images/apple-touch-icon.png differ