106 |
Welcome to Grails
107 |
Congratulations, you have successfully started your first Grails application! At the moment
108 | this is the default page, feel free to modify it to either redirect to a controller or display whatever
109 | content you may choose. Below is a list of controllers that are currently deployed in this application,
110 | click on each to execute its default action:
111 |
112 |
113 |
Available Controllers:
114 |
115 |
116 | - ${c.fullName}
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/grails-app/conf/DataSource.groovy:
--------------------------------------------------------------------------------
1 | dataSource {
2 | pooled = true
3 | jmxExport = true
4 | driverClassName = "org.h2.Driver"
5 | username = "sa"
6 | password = ""
7 | }
8 | hibernate {
9 | cache.use_second_level_cache = true
10 | cache.use_query_cache = false
11 | cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
12 | // cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
13 | }
14 |
15 | // environment specific settings
16 | environments {
17 | development {
18 | dataSource {
19 | dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
20 | url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
21 | }
22 | }
23 | test {
24 | dataSource {
25 | dbCreate = "update"
26 | url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
27 | }
28 | }
29 | production {
30 | dataSource {
31 | dbCreate = "update"
32 | url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
33 | properties {
34 | // Documentation for Tomcat JDBC Pool
35 | // http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Common_Attributes
36 | // https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/tomcat/jdbc/pool/PoolConfiguration.html
37 | jmxEnabled = true
38 | initialSize = 5
39 | maxActive = 50
40 | minIdle = 5
41 | maxIdle = 25
42 | maxWait = 10000
43 | maxAge = 10 * 60000
44 | timeBetweenEvictionRunsMillis = 5000
45 | minEvictableIdleTimeMillis = 60000
46 | validationQuery = "SELECT 1"
47 | validationQueryTimeout = 3
48 | validationInterval = 15000
49 | testOnBorrow = true
50 | testWhileIdle = true
51 | testOnReturn = false
52 | ignoreExceptionOnPreLoad = true
53 | // http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#JDBC_interceptors
54 | jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
55 | defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED // safe default
56 | // controls for leaked connections
57 | abandonWhenPercentageFull = 100 // settings are active only when pool is full
58 | removeAbandonedTimeout = 120000
59 | removeAbandoned = true
60 | // use JMX console to change this setting at runtime
61 | logAbandoned = false // causes stacktrace recording overhead, use only for debugging
62 | /*
63 | // JDBC driver properties
64 | // Mysql as example
65 | dbProperties {
66 | // Mysql specific driver properties
67 | // http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html
68 | // let Tomcat JDBC Pool handle reconnecting
69 | autoReconnect=false
70 | // truncation behaviour
71 | jdbcCompliantTruncation=false
72 | // mysql 0-date conversion
73 | zeroDateTimeBehavior='convertToNull'
74 | // Tomcat JDBC Pool's StatementCache is used instead, so disable mysql driver's cache
75 | cachePrepStmts=false
76 | cacheCallableStmts=false
77 | // Tomcat JDBC Pool's StatementFinalizer keeps track
78 | dontTrackOpenResources=true
79 | // performance optimization: reduce number of SQLExceptions thrown in mysql driver code
80 | holdResultsOpenOverStatementClose=true
81 | // enable MySQL query cache - using server prep stmts will disable query caching
82 | useServerPrepStmts=false
83 | // metadata caching
84 | cacheServerConfiguration=true
85 | cacheResultSetMetadata=true
86 | metadataCacheSize=100
87 | // timeouts for TCP/IP
88 | connectTimeout=15000
89 | socketTimeout=120000
90 | // timer tuning (disable)
91 | maintainTimeStats=false
92 | enableQueryTimeouts=false
93 | // misc tuning
94 | noDatetimeStringSync=true
95 | }
96 | */
97 | }
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/grails-app/conf/Config.groovy:
--------------------------------------------------------------------------------
1 | grails.project.groupId = 'com.example.contact' // change this to alter the default package name and Maven publishing destination
2 |
3 | // The ACCEPT header will not be used for content negotiation for user agents containing the following strings (defaults to the 4 major rendering engines)
4 | grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
5 | grails.mime.types = [ // the first one is the default format
6 | all: '*/*', // 'all' maps to '*' or the first available format in withFormat
7 | atom: 'application/atom+xml',
8 | css: 'text/css',
9 | csv: 'text/csv',
10 | form: 'application/x-www-form-urlencoded',
11 | html: ['text/html','application/xhtml+xml'],
12 | js: 'text/javascript',
13 | json: ['application/json', 'text/json'],
14 | multipartForm: 'multipart/form-data',
15 | rss: 'application/rss+xml',
16 | text: 'text/plain',
17 | hal: ['application/hal+json','application/hal+xml'],
18 | xml: ['text/xml', 'application/xml']
19 | ]
20 |
21 | // URL Mapping Cache Max Size, defaults to 5000
22 | //grails.urlmapping.cache.maxsize = 1000
23 |
24 | // What URL patterns should be processed by the resources plugin
25 | grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
26 | grails.resources.adhoc.excludes = ['/WEB-INF/**']
27 |
28 | // Legacy setting for codec used to encode data with ${}
29 | grails.views.default.codec = "html"
30 |
31 | // The default scope for controllers. May be prototype, session or singleton.
32 | // If unspecified, controllers are prototype scoped.
33 | grails.controllers.defaultScope = 'singleton'
34 |
35 | // GSP settings
36 | grails {
37 | views {
38 | gsp {
39 | encoding = 'UTF-8'
40 | htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping
41 | codecs {
42 | expression = 'html' // escapes values inside ${}
43 | scriptlet = 'html' // escapes output from scriptlets in GSPs
44 | taglib = 'none' // escapes output from taglibs
45 | staticparts = 'none' // escapes output from static template parts
46 | }
47 | }
48 | // escapes all not-encoded output at final stage of outputting
49 | // filteringCodecForContentType.'text/html' = 'html'
50 | }
51 | }
52 |
53 |
54 | grails.converters.encoding = "UTF-8"
55 | // scaffolding templates configuration
56 | grails.scaffolding.templates.domainSuffix = 'Instance'
57 |
58 | // Set to false to use the new Grails 1.2 JSONBuilder in the render method
59 | grails.json.legacy.builder = false
60 | // enabled native2ascii conversion of i18n properties files
61 | grails.enable.native2ascii = true
62 | // packages to include in Spring bean scanning
63 | grails.spring.bean.packages = []
64 | // whether to disable processing of multi part requests
65 | grails.web.disable.multipart=false
66 |
67 | // request parameters to mask when logging exceptions
68 | grails.exceptionresolver.params.exclude = ['password']
69 |
70 | // configure auto-caching of queries by default (if false you can cache individual queries with 'cache: true')
71 | grails.hibernate.cache.queries = false
72 |
73 | environments {
74 | development {
75 | grails.logging.jul.usebridge = true
76 | }
77 | production {
78 | grails.logging.jul.usebridge = false
79 | // TODO: grails.serverURL = "http://www.changeme.com"
80 | }
81 | }
82 |
83 | // log4j configuration
84 | log4j = {
85 | // Example of changing the log pattern for the default console appender:
86 | //
87 | //appenders {
88 | // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
89 | //}
90 |
91 | error 'org.codehaus.groovy.grails.web.servlet', // controllers
92 | 'org.codehaus.groovy.grails.web.pages', // GSP
93 | 'org.codehaus.groovy.grails.web.sitemesh', // layouts
94 | 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
95 | 'org.codehaus.groovy.grails.web.mapping', // URL mapping
96 | 'org.codehaus.groovy.grails.commons', // core / classloading
97 | 'org.codehaus.groovy.grails.plugins', // plugins
98 | 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
99 | 'org.springframework',
100 | 'org.hibernate',
101 | 'net.sf.ehcache.hibernate'
102 | }
103 |
104 |
105 | // Added by the Spring Security Core plugin:
106 | grails.plugin.springsecurity.userLookup.userDomainClassName = 'com.example.auth.User'
107 | grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'com.example.auth.UserRole'
108 | grails.plugin.springsecurity.authority.className = 'com.example.auth.Role'
109 | grails.plugin.springsecurity.controllerAnnotations.staticRules = [
110 | '/': ['permitAll'],
111 | '/index': ['permitAll'],
112 | '/index.gsp': ['permitAll'],
113 | '/**/js/**': ['permitAll'],
114 | '/**/css/**': ['permitAll'],
115 | '/**/images/**': ['permitAll'],
116 | '/**/favicon.ico': ['permitAll'],
117 | '/contact/*': ['permitAll']
118 | ]
119 |
120 | grails.plugin.springsecurity.rest.login.useJsonCredentials = true
121 | grails.plugin.springsecurity.rest.token.storage.useGorm = true
122 | grails.plugin.springsecurity.rest.token.storage.gorm.tokenDomainClassName = 'com.example.auth.AuthenticationToken'
123 | //grails.plugin.springsecurity.rest.token.storage.gorm.tokenValuePropertyName = 'tokenValue'
124 | //grails.plugin.springsecurity.rest.token.storage.gorm.usernamePropertyName = 'username'
125 |
126 |
--------------------------------------------------------------------------------
/grailsw.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem ##
4 | @rem Grails JVM Bootstrap for Windows ##
5 | @rem ##
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set CLASS=org.grails.wrapper.GrailsWrapper
12 |
13 | if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat"
14 |
15 | @rem Determine the command interpreter to execute the "CD" later
16 | set COMMAND_COM="cmd.exe"
17 | if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
18 | if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
19 |
20 | @rem Use explicit find.exe to prevent cygwin and others find.exe from being used
21 | set FIND_EXE="find.exe"
22 | if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
23 | if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
24 |
25 | :check_JAVA_HOME
26 | @rem Make sure we have a valid JAVA_HOME
27 | if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
28 |
29 | echo.
30 | echo ERROR: Environment variable JAVA_HOME has not been set.
31 | echo.
32 | echo Please set the JAVA_HOME variable in your environment to match the
33 | echo location of your Java installation.
34 | echo.
35 | goto end
36 |
37 | :have_JAVA_HOME
38 | @rem Remove trailing slash from JAVA_HOME if found
39 | if "%JAVA_HOME:~-1%"=="\" SET JAVA_HOME=%JAVA_HOME:~0,-1%
40 |
41 | @rem Validate JAVA_HOME
42 | %COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
43 | if not errorlevel 1 goto check_GRAILS_HOME
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 | echo.
51 | goto end
52 |
53 | :check_GRAILS_HOME
54 | @rem Define GRAILS_HOME if not set
55 | if "%GRAILS_HOME%" == "" set GRAILS_HOME=%DIRNAME%..
56 |
57 | @rem Remove trailing slash from GRAILS_HOME if found
58 | if "%GRAILS_HOME:~-1%"=="\" SET GRAILS_HOME=%GRAILS_HOME:~0,-1%
59 |
60 | :init
61 |
62 | for %%x in ("%HOMEPATH%") do set SHORTHOME=%%~fsx
63 | if "x%GRAILS_AGENT_CACHE_DIR%" == "x" set GRAILS_AGENT_CACHE_DIR=%SHORTHOME%/.grails/2.3.6/
64 | set SPRINGLOADED_PARAMS="profile=grails;cacheDir=%GRAILS_AGENT_CACHE_DIR%"
65 | if not exist "%GRAILS_AGENT_CACHE_DIR%" mkdir "%GRAILS_AGENT_CACHE_DIR%"
66 |
67 | set AGENT_STRING=-javaagent:wrapper/springloaded-core-1.1.4.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=\"%SPRINGLOADED_PARAMS%\"
68 | set DISABLE_RELOADING=
69 | if "%GRAILS_OPTS%" == "" set GRAILS_OPTS=-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8
70 |
71 | @rem Get command-line arguments, handling Windows variants
72 | if "%@eval[2+2]" == "4" goto 4NT_args
73 |
74 | @rem Slurp the command line arguments.
75 | set CMD_LINE_ARGS=
76 | set CP=
77 | set INTERACTIVE=true
78 |
79 | :win9xME_args_slurp
80 | if "x%~1" == "x" goto execute
81 | set CURR_ARG=%~1
82 | if "%CURR_ARG:~0,2%" == "-D" (
83 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %~1=%~2
84 | shift
85 | shift
86 | goto win9xME_args_slurp
87 | )
88 | if "x%~1" == "x-cp" (
89 | set CP=%~2
90 | shift
91 | shift
92 | goto win9xME_args_slurp
93 | )
94 | if "x%~1" == "x-debug" (
95 | set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
96 | shift
97 | goto win9xME_args_slurp
98 | )
99 | if "x%~1" == "x-classpath" (
100 | set CP=%~2
101 | shift
102 | shift
103 | goto win9xME_args_slurp
104 | )
105 | if "x%~1" == "x-reloading" (
106 | set AGENT=%AGENT_STRING%
107 | shift
108 | goto win9xME_args_slurp
109 | )
110 | if "x%~1" == "xrun-app" (
111 | set AGENT=%AGENT_STRING%
112 | set INTERACTIVE=
113 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
114 | shift
115 | goto win9xME_args_slurp
116 | )
117 | if "x%~1" == "x-noreloading" (
118 | set DISABLE_RELOADING=true
119 | shift
120 | goto win9xME_args_slurp
121 | )
122 | set INTERACTIVE=
123 | set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
124 | shift
125 | goto win9xME_args_slurp
126 |
127 | :4NT_args
128 | @rem Get arguments from the 4NT Shell from JP Software
129 | set CMD_LINE_ARGS=%$
130 |
131 | :execute
132 | @rem Setup the command line
133 | set STARTER_CLASSPATH=wrapper/grails-wrapper-runtime-2.3.6.jar;wrapper;.
134 |
135 | if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"
136 |
137 | @rem Setting a classpath using the -cp or -classpath option means not to use
138 | @rem the global classpath. Groovy behaves then the same as the java interpreter
139 |
140 | if "x" == "x%CLASSPATH%" goto after_classpath
141 | set CP=%CP%;%CLASSPATH%
142 | :after_classpath
143 |
144 | if "x%DISABLE_RELOADING%" == "xtrue" (
145 | set AGENT=
146 | ) else (
147 | if "x%INTERACTIVE%" == "xtrue" (
148 | set AGENT=%AGENT_STRING%
149 | )
150 | )
151 |
152 | set STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
153 | set STARTER_CONF=%GRAILS_HOME%\conf\groovy-starter.conf
154 |
155 | set JAVA_EXE=%JAVA_HOME%\bin\java.exe
156 | set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar
157 |
158 | set JAVA_OPTS=%GRAILS_OPTS% %JAVA_OPTS% %AGENT%
159 |
160 | set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
161 | set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home="%GRAILS_HOME%"
162 | set JAVA_OPTS=%JAVA_OPTS% -Dgrails.version=2.3.6
163 | set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir=.
164 | set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
165 | set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
166 |
167 | if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"
168 |
169 | @rem Execute Grails
170 | CALL "%JAVA_EXE%" %JAVA_OPTS% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" "%CMD_LINE_ARGS%"
171 | :end
172 | @rem End local scope for the variables with windows NT shell
173 | if "%OS%"=="Windows_NT" endlocal
174 |
175 | @rem Optional pause the batch file
176 | if "%GROOVY_BATCH_PAUSE%" == "on" pause
177 |
--------------------------------------------------------------------------------
/grailsw:
--------------------------------------------------------------------------------
1 | ##############################################################################
2 | ## ##
3 | ## Grails JVM Bootstrap for UN*X ##
4 | ## ##
5 | ##############################################################################
6 |
7 | PROGNAME=`basename "$0"`
8 | DIRNAME=`dirname "$0"`
9 |
10 | # Use the maximum available, or set MAX_FD != -1 to use that
11 | MAX_FD="maximum"
12 |
13 | warn() {
14 | echo "${PROGNAME}: $*"
15 | }
16 |
17 | die() {
18 | warn "$*"
19 | exit 1
20 | }
21 |
22 | earlyInit() {
23 | return
24 | }
25 | lateInit() {
26 | return
27 | }
28 |
29 | GROOVY_STARTUP=~/.groovy/startup
30 | if [ -r "$GROOVY_STARTUP" ]; then
31 | . "$GROOVY_STARTUP"
32 | fi
33 |
34 | earlyInit
35 |
36 | # OS specific support (must be 'true' or 'false').
37 | cygwin=false;
38 | darwin=false;
39 | mingw=false;
40 | case "`uname`" in
41 | CYGWIN*)
42 | cygwin=true
43 | ;;
44 |
45 | Darwin*)
46 | darwin=true
47 | ;;
48 |
49 | MINGW*)
50 | mingw=true
51 | ;;
52 | esac
53 |
54 | # Attempt to set JAVA_HOME if it's not already set
55 | if [ -z "$JAVA_HOME" ]; then
56 |
57 | # Set JAVA_HOME for Darwin
58 | if $darwin; then
59 |
60 | [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] &&
61 | export JAVA_HOME="/Library/Java/Home"
62 |
63 | [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] &&
64 | export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
65 |
66 | fi
67 |
68 | fi
69 |
70 | # For Cygwin, ensure paths are in UNIX format before anything is touched
71 | if $cygwin ; then
72 | [ -n "$GRAILS_HOME" ] &&
73 | GRAILS_HOME=`cygpath --unix "$GRAILS_HOME"`
74 | [ -n "$JAVACMD" ] &&
75 | JAVACMD=`cygpath --unix "$JAVACMD"`
76 | [ -n "$JAVA_HOME" ] &&
77 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
78 | [ -n "$CP" ] &&
79 | CP=`cygpath --path --unix "$CP"`
80 | fi
81 |
82 | # Remove possible trailing slash (after possible cygwin correction)
83 | GRAILS_HOME=`echo $GRAILS_HOME | sed -e 's|/$||g'`
84 |
85 | # Locate GRAILS_HOME if not it is not set
86 | if [ -z "$GRAILS_HOME" -o ! -d "$GRAILS_HOME" ] ; then
87 | # resolve links - $0 may be a link to groovy's home
88 | PRG="$0"
89 |
90 | # need this for relative symlinks
91 | while [ -h "$PRG" ] ; do
92 | ls=`ls -ld "$PRG"`
93 | link=`expr "$ls" : '.*-> \(.*\)$'`
94 | if expr "$link" : '/.*' > /dev/null; then
95 | PRG="$link"
96 | else
97 | PRG=`dirname "$PRG"`"/$link"
98 | fi
99 | done
100 |
101 | SAVED="`pwd`"
102 | cd "`dirname \"$PRG\"`/.."
103 | GRAILS_HOME="`pwd -P`"
104 | cd "$SAVED"
105 | fi
106 |
107 | # Warn the user if JAVA_HOME and/or GRAILS_HOME are not set.
108 | if [ -z "$JAVA_HOME" ] ; then
109 | die "JAVA_HOME environment variable is not set"
110 | elif [ ! -d "$JAVA_HOME" ] ; then
111 | die "JAVA_HOME is not a directory: $JAVA_HOME"
112 | fi
113 |
114 | if [ -z "$GRAILS_HOME" ] ; then
115 | warn "GRAILS_HOME environment variable is not set"
116 | fi
117 |
118 | if [ ! -d "$GRAILS_HOME" ] ; then
119 | die "GRAILS_HOME is not a directory: $GRAILS_HOME"
120 | fi
121 |
122 | # Use default groovy-conf config
123 | if [ -z "$STARTER_CONF" ]; then
124 | STARTER_CONF="$GRAILS_HOME/conf/groovy-starter.conf"
125 | fi
126 | STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.3.6.jar:wrapper:."
127 |
128 | # Allow access to Cocoa classes on OS X
129 | if $darwin; then
130 | STARTER_CLASSPATH="$STARTER_CLASSPATH:/System/Library/Java/Support"
131 | fi
132 |
133 | # Create the final classpath
134 | # Setting a classpath using the -cp or -classpath option means not to use
135 | # the global classpath. Groovy behaves then the same as the java
136 | # interpreter
137 | if [ -n "$CP" ] ; then
138 | CP="$CP"
139 | elif [ -n "$CLASSPATH" ] ; then
140 | CP="$CLASSPATH"
141 | fi
142 |
143 | # Determine the Java command to use to start the JVM
144 | if [ -z "$JAVACMD" ]; then
145 | if [ -n "$JAVA_HOME" ]; then
146 | if [ -x "$JAVA_HOME/jre/sh/java" ]; then
147 | # IBM's JDK on AIX uses strange locations for the executables
148 | JAVACMD="$JAVA_HOME/jre/sh/java"
149 | else
150 | JAVACMD="$JAVA_HOME/bin/java"
151 | fi
152 | else
153 | JAVACMD="java"
154 | fi
155 | fi
156 | if [ ! -x "$JAVACMD" ]; then
157 | die "JAVA_HOME is not defined correctly; can not execute: $JAVACMD"
158 | fi
159 |
160 | # Increase the maximum file descriptors if we can
161 | if [ "$cygwin" = "false" ]; then
162 | MAX_FD_LIMIT=`ulimit -H -n`
163 | if [ "$MAX_FD_LIMIT" != "unlimited" ]; then
164 | if [ $? -eq 0 ]; then
165 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
166 | # use the businessSystem max
167 | MAX_FD="$MAX_FD_LIMIT"
168 | fi
169 |
170 | ulimit -n $MAX_FD
171 | if [ $? -ne 0 ]; then
172 | warn "Could not set maximum file descriptor limit: $MAX_FD"
173 | fi
174 | else
175 | warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
176 | fi
177 | fi
178 | fi
179 |
180 | # Fix the cygwin agent issue
181 | AGENT_GRAILS_HOME=$GRAILS_HOME
182 | if $cygwin ; then
183 | [ -n "$GRAILS_HOME" ] &&
184 | AGENT_GRAILS_HOME=`cygpath --windows "$GRAILS_HOME"`
185 | fi
186 |
187 | if $mingw ; then
188 | # Converts GRAILS_HOME path to Windows syntax
189 | [ -n "$GRAILS_HOME" ] &&
190 | AGENT_GRAILS_HOME=`cmd //C echo "$GRAILS_HOME"`
191 | fi
192 |
193 | if [ -z "$GRAILS_AGENT_CACHE_DIR" ]; then
194 | GRAILS_AGENT_CACHE_DIR=~/.grails/2.3.6/
195 | fi
196 | SPRINGLOADED_PARAMS=profile=grails\;cacheDir=$GRAILS_AGENT_CACHE_DIR
197 | if [ ! -d "$GRAILS_AGENT_CACHE_DIR" ]; then
198 | mkdir -p "$GRAILS_AGENT_CACHE_DIR"
199 | fi
200 |
201 | # Process JVM args
202 | AGENT_STRING="-javaagent:wrapper/springloaded-core-1.1.4.jar -noverify -Dspringloaded.synchronize=true -Djdk.reflect.allowGetCallerClass=true -Dspringloaded=$SPRINGLOADED_PARAMS"
203 | CMD_LINE_ARGS=""
204 | DISABLE_RELOADING=true
205 |
206 | while true; do
207 | if [ "$1" = "-cp" ] || [ "$1" = "-classpath" ]; then
208 | CP=$2
209 | shift 2
210 | break
211 | fi
212 |
213 | if [ "$1" = "-reloading" ]; then
214 | AGENT=$AGENT_STRING
215 | DISABLE_RELOADING=false
216 | shift
217 | break
218 | fi
219 |
220 | if [ "$1" = "-noreloading" ]; then
221 | DISABLE_RELOADING=true
222 | shift
223 | break
224 | fi
225 |
226 | if [ "$1" = "-debug" ]; then
227 | JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Dgrails.full.stacktrace=true -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
228 | shift
229 | break
230 | fi
231 |
232 | if [ "$1" != -* ]; then
233 | break
234 | fi
235 |
236 | CMD_LINE_ARGS="$CMD_LINE_ARGS $1"
237 | shift
238 | done
239 |
240 | # Enable agent-based reloading for the 'run-app' command.
241 | if ! $DISABLE_RELOADING; then
242 | for a in "$@"; do
243 | if [ "$a" = "run-app" ]; then
244 | AGENT=$AGENT_STRING
245 | fi
246 | done
247 |
248 | if [ $# = 0 ]; then
249 | AGENT=$AGENT_STRING
250 | fi
251 | fi
252 |
253 | ARGUMENTS="$CMD_LINE_ARGS $@"
254 |
255 | # Setup Profiler
256 | useprofiler=false
257 | if [ "x$PROFILER" != "x" ]; then
258 | if [ -r "$PROFILER" ]; then
259 | . $PROFILER
260 | useprofiler=true
261 | else
262 | die "Profiler file not found: $PROFILER"
263 | fi
264 | fi
265 |
266 | # For Darwin, use classes.jar for TOOLS_JAR
267 | TOOLS_JAR="$JAVA_HOME/lib/tools.jar"
268 | if $darwin; then
269 | JAVA_OPTS="-Xdock:name=Grails -Xdock:icon=$GRAILS_HOME/media/icons/grails.icns $JAVA_OPTS"
270 | # TOOLS_JAR="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes/classes.jar"
271 | fi
272 |
273 | # For Cygwin, switch paths to Windows format before running java
274 | if $cygwin; then
275 | GRAILS_HOME=`cygpath --path --mixed "$GRAILS_HOME"`
276 | JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
277 | STARTER_CONF=`cygpath --path --mixed "$STARTER_CONF"`
278 | if [ "x$CP" != "x" ] ; then
279 | CP=`cygpath --path --mixed "$CP"`
280 | fi
281 | TOOLS_JAR=`cygpath --path --mixed "$TOOLS_JAR"`
282 | STARTER_CLASSPATH=`cygpath --path --mixed "$STARTER_CLASSPATH"`
283 | # We build the pattern for arguments to be converted via cygpath
284 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
285 | SEP=""
286 | for dir in $ROOTDIRSRAW; do
287 | ROOTDIRS="$ROOTDIRS$SEP$dir"
288 | SEP="|"
289 | done
290 | OURCYGPATTERN="(^($ROOTDIRS))"
291 | # Add a user-defined pattern to the cygpath arguments
292 | if [ "$GROOVY_CYGPATTERN" != "" ] ; then
293 | OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
294 | fi
295 | # Now convert the arguments
296 | ARGUMENTS=""
297 | for arg in "$@" ; do
298 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
299 | if [ $CHECK -ne 0 ] ; then
300 | convArg=`cygpath --path --ignore --mixed "$arg"`
301 | else
302 | convArg=$arg
303 | fi
304 | ARGUMENTS="$ARGUMENTS $convArg"
305 | done
306 | fi
307 |
308 | STARTER_MAIN_CLASS=org.grails.wrapper.GrailsWrapper
309 |
310 | lateInit
311 |
312 | startGrails() {
313 | CLASS=$1
314 | shift
315 | if [ -n "$GRAILS_OPTS" ]
316 | then
317 | GRAILS_OPTS="$GRAILS_OPTS"
318 | else
319 | GRAILS_OPTS="-server -Xmx768M -Xms64M -XX:PermSize=32m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8"
320 | fi
321 | JAVA_OPTS="$GRAILS_OPTS $JAVA_OPTS $AGENT"
322 | # Start the Profiler or the JVM
323 | if $useprofiler; then
324 | runProfiler
325 | else
326 | if [ $# -eq 0 ] ; then # no argument given
327 | exec "$JAVACMD" $JAVA_OPTS \
328 | -classpath "$STARTER_CLASSPATH" \
329 | -Dgrails.home="$GRAILS_HOME" \
330 | -Dtools.jar="$TOOLS_JAR" \
331 | -Djava.net.preferIPv4Stack=true \
332 | $STARTER_MAIN_CLASS \
333 | --main $CLASS \
334 | --conf "$STARTER_CONF" \
335 | --classpath "$CP"
336 | else
337 | exec "$JAVACMD" $JAVA_OPTS \
338 | -classpath "$STARTER_CLASSPATH" \
339 | -Dgrails.home="$GRAILS_HOME" \
340 | -Dtools.jar="$TOOLS_JAR" \
341 | -Djava.net.preferIPv4Stack=true \
342 | $STARTER_MAIN_CLASS \
343 | --main $CLASS \
344 | --conf "$STARTER_CONF" \
345 | --classpath "$CP" \
346 | "${ARGUMENTS}"
347 | fi
348 | fi
349 | }
350 |
351 | startGrails $STARTER_MAIN_CLASS "$@"
352 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/web-app/css/main.css:
--------------------------------------------------------------------------------
1 | /* FONT STACK */
2 | body,
3 | input, select, textarea {
4 | font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
5 | }
6 |
7 | h1, h2, h3, h4, h5, h6 {
8 | line-height: 1.1;
9 | }
10 |
11 | /* BASE LAYOUT */
12 |
13 | html {
14 | background-color: #ddd;
15 | background-image: -moz-linear-gradient(center top, #aaa, #ddd);
16 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #aaa), color-stop(1, #ddd));
17 | background-image: linear-gradient(top, #aaa, #ddd);
18 | filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#aaaaaa', EndColorStr = '#dddddd');
19 | background-repeat: no-repeat;
20 | height: 100%;
21 | /* change the box model to exclude the padding from the calculation of 100% height (IE8+) */
22 | -webkit-box-sizing: border-box;
23 | -moz-box-sizing: border-box;
24 | box-sizing: border-box;
25 | }
26 |
27 | html.no-cssgradients {
28 | background-color: #aaa;
29 | }
30 |
31 | .ie6 html {
32 | height: 100%;
33 | }
34 |
35 | html * {
36 | margin: 0;
37 | }
38 |
39 | body {
40 | background: #ffffff;
41 | color: #333333;
42 | margin: 0 auto;
43 | max-width: 960px;
44 | overflow-x: hidden; /* prevents box-shadow causing a horizontal scrollbar in firefox when viewport < 960px wide */
45 | -moz-box-shadow: 0 0 0.3em #255b17;
46 | -webkit-box-shadow: 0 0 0.3em #255b17;
47 | box-shadow: 0 0 0.3em #255b17;
48 | }
49 |
50 | #grailsLogo {
51 | background-color: #abbf78;
52 | }
53 |
54 | /* replace with .no-boxshadow body if you have modernizr available */
55 | .ie6 body,
56 | .ie7 body,
57 | .ie8 body {
58 | border-color: #255b17;
59 | border-style: solid;
60 | border-width: 0 1px;
61 | }
62 |
63 | .ie6 body {
64 | height: 100%;
65 | }
66 |
67 | a:link, a:visited, a:hover {
68 | color: #48802c;
69 | }
70 |
71 | a:hover, a:active {
72 | outline: none; /* prevents outline in webkit on active links but retains it for tab focus */
73 | }
74 |
75 | h1 {
76 | color: #48802c;
77 | font-weight: normal;
78 | font-size: 1.25em;
79 | margin: 0.8em 0 0.3em 0;
80 | }
81 |
82 | ul {
83 | padding: 0;
84 | }
85 |
86 | img {
87 | border: 0;
88 | }
89 |
90 | /* GENERAL */
91 |
92 | #grailsLogo a {
93 | display: inline-block;
94 | margin: 1em;
95 | }
96 |
97 | .content {
98 | }
99 |
100 | .content h1 {
101 | border-bottom: 1px solid #CCCCCC;
102 | margin: 0.8em 1em 0.3em;
103 | padding: 0 0.25em;
104 | }
105 |
106 | .scaffold-list h1 {
107 | border: none;
108 | }
109 |
110 | .footer {
111 | background: #abbf78;
112 | color: #000;
113 | clear: both;
114 | font-size: 0.8em;
115 | margin-top: 1.5em;
116 | padding: 1em;
117 | min-height: 1em;
118 | }
119 |
120 | .footer a {
121 | color: #255b17;
122 | }
123 |
124 | .spinner {
125 | background: url(../images/spinner.gif) 50% 50% no-repeat transparent;
126 | height: 16px;
127 | width: 16px;
128 | padding: 0.5em;
129 | position: absolute;
130 | right: 0;
131 | top: 0;
132 | text-indent: -9999px;
133 | }
134 |
135 | /* NAVIGATION MENU */
136 |
137 | .nav {
138 | background-color: #efefef;
139 | padding: 0.5em 0.75em;
140 | -moz-box-shadow: 0 0 3px 1px #aaaaaa;
141 | -webkit-box-shadow: 0 0 3px 1px #aaaaaa;
142 | box-shadow: 0 0 3px 1px #aaaaaa;
143 | zoom: 1;
144 | }
145 |
146 | .nav ul {
147 | overflow: hidden;
148 | padding-left: 0;
149 | zoom: 1;
150 | }
151 |
152 | .nav li {
153 | display: block;
154 | float: left;
155 | list-style-type: none;
156 | margin-right: 0.5em;
157 | padding: 0;
158 | }
159 |
160 | .nav a {
161 | color: #666666;
162 | display: block;
163 | padding: 0.25em 0.7em;
164 | text-decoration: none;
165 | -moz-border-radius: 0.3em;
166 | -webkit-border-radius: 0.3em;
167 | border-radius: 0.3em;
168 | }
169 |
170 | .nav a:active, .nav a:visited {
171 | color: #666666;
172 | }
173 |
174 | .nav a:focus, .nav a:hover {
175 | background-color: #999999;
176 | color: #ffffff;
177 | outline: none;
178 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
179 | }
180 |
181 | .no-borderradius .nav a:focus, .no-borderradius .nav a:hover {
182 | background-color: transparent;
183 | color: #444444;
184 | text-decoration: underline;
185 | }
186 |
187 | .nav a.home, .nav a.list, .nav a.create {
188 | background-position: 0.7em center;
189 | background-repeat: no-repeat;
190 | text-indent: 25px;
191 | }
192 |
193 | .nav a.home {
194 | background-image: url(../images/skin/house.png);
195 | }
196 |
197 | .nav a.list {
198 | background-image: url(../images/skin/database_table.png);
199 | }
200 |
201 | .nav a.create {
202 | background-image: url(../images/skin/database_add.png);
203 | }
204 |
205 | /* CREATE/EDIT FORMS AND SHOW PAGES */
206 |
207 | fieldset,
208 | .property-list {
209 | margin: 0.6em 1.25em 0 1.25em;
210 | padding: 0.3em 1.8em 1.25em;
211 | position: relative;
212 | zoom: 1;
213 | border: none;
214 | }
215 |
216 | .property-list .fieldcontain {
217 | list-style: none;
218 | overflow: hidden;
219 | zoom: 1;
220 | }
221 |
222 | .fieldcontain {
223 | margin-top: 1em;
224 | }
225 |
226 | .fieldcontain label,
227 | .fieldcontain .property-label {
228 | color: #666666;
229 | text-align: right;
230 | width: 25%;
231 | }
232 |
233 | .fieldcontain .property-label {
234 | float: left;
235 | }
236 |
237 | .fieldcontain .property-value {
238 | display: block;
239 | margin-left: 27%;
240 | }
241 |
242 | label {
243 | cursor: pointer;
244 | display: inline-block;
245 | margin: 0 0.25em 0 0;
246 | }
247 |
248 | input, select, textarea {
249 | background-color: #fcfcfc;
250 | border: 1px solid #cccccc;
251 | font-size: 1em;
252 | padding: 0.2em 0.4em;
253 | }
254 |
255 | select {
256 | padding: 0.2em 0.2em 0.2em 0;
257 | }
258 |
259 | select[multiple] {
260 | vertical-align: top;
261 | }
262 |
263 | textarea {
264 | width: 250px;
265 | height: 150px;
266 | overflow: auto; /* IE always renders vertical scrollbar without this */
267 | vertical-align: top;
268 | }
269 |
270 | input[type=checkbox], input[type=radio] {
271 | background-color: transparent;
272 | border: 0;
273 | padding: 0;
274 | }
275 |
276 | input:focus, select:focus, textarea:focus {
277 | background-color: #ffffff;
278 | border: 1px solid #eeeeee;
279 | outline: 0;
280 | -moz-box-shadow: 0 0 0.5em #ffffff;
281 | -webkit-box-shadow: 0 0 0.5em #ffffff;
282 | box-shadow: 0 0 0.5em #ffffff;
283 | }
284 |
285 | .required-indicator {
286 | color: #48802C;
287 | display: inline-block;
288 | font-weight: bold;
289 | margin-left: 0.3em;
290 | position: relative;
291 | top: 0.1em;
292 | }
293 |
294 | ul.one-to-many {
295 | display: inline-block;
296 | list-style-position: inside;
297 | vertical-align: top;
298 | }
299 |
300 | .ie6 ul.one-to-many, .ie7 ul.one-to-many {
301 | display: inline;
302 | zoom: 1;
303 | }
304 |
305 | ul.one-to-many li.add {
306 | list-style-type: none;
307 | }
308 |
309 | /* EMBEDDED PROPERTIES */
310 |
311 | fieldset.embedded {
312 | background-color: transparent;
313 | border: 1px solid #CCCCCC;
314 | margin-left: 0;
315 | margin-right: 0;
316 | padding-left: 0;
317 | padding-right: 0;
318 | -moz-box-shadow: none;
319 | -webkit-box-shadow: none;
320 | box-shadow: none;
321 | }
322 |
323 | fieldset.embedded legend {
324 | margin: 0 1em;
325 | }
326 |
327 | /* MESSAGES AND ERRORS */
328 |
329 | .errors,
330 | .message {
331 | font-size: 0.8em;
332 | line-height: 2;
333 | margin: 1em 2em;
334 | padding: 0.25em;
335 | }
336 |
337 | .message {
338 | background: #f3f3ff;
339 | border: 1px solid #b2d1ff;
340 | color: #006dba;
341 | -moz-box-shadow: 0 0 0.25em #b2d1ff;
342 | -webkit-box-shadow: 0 0 0.25em #b2d1ff;
343 | box-shadow: 0 0 0.25em #b2d1ff;
344 | }
345 |
346 | .errors {
347 | background: #fff3f3;
348 | border: 1px solid #ffaaaa;
349 | color: #cc0000;
350 | -moz-box-shadow: 0 0 0.25em #ff8888;
351 | -webkit-box-shadow: 0 0 0.25em #ff8888;
352 | box-shadow: 0 0 0.25em #ff8888;
353 | }
354 |
355 | .errors ul,
356 | .message {
357 | padding: 0;
358 | }
359 |
360 | .errors li {
361 | list-style: none;
362 | background: transparent url(../images/skin/exclamation.png) 0.5em 50% no-repeat;
363 | text-indent: 2.2em;
364 | }
365 |
366 | .message {
367 | background: transparent url(../images/skin/information.png) 0.5em 50% no-repeat;
368 | text-indent: 2.2em;
369 | }
370 |
371 | /* form fields with errors */
372 |
373 | .error input, .error select, .error textarea {
374 | background: #fff3f3;
375 | border-color: #ffaaaa;
376 | color: #cc0000;
377 | }
378 |
379 | .error input:focus, .error select:focus, .error textarea:focus {
380 | -moz-box-shadow: 0 0 0.5em #ffaaaa;
381 | -webkit-box-shadow: 0 0 0.5em #ffaaaa;
382 | box-shadow: 0 0 0.5em #ffaaaa;
383 | }
384 |
385 | /* same effects for browsers that support HTML5 client-side validation (these have to be specified separately or IE will ignore the entire rule) */
386 |
387 | input:invalid, select:invalid, textarea:invalid {
388 | background: #fff3f3;
389 | border-color: #ffaaaa;
390 | color: #cc0000;
391 | }
392 |
393 | input:invalid:focus, select:invalid:focus, textarea:invalid:focus {
394 | -moz-box-shadow: 0 0 0.5em #ffaaaa;
395 | -webkit-box-shadow: 0 0 0.5em #ffaaaa;
396 | box-shadow: 0 0 0.5em #ffaaaa;
397 | }
398 |
399 | /* TABLES */
400 |
401 | table {
402 | border-top: 1px solid #DFDFDF;
403 | border-collapse: collapse;
404 | width: 100%;
405 | margin-bottom: 1em;
406 | }
407 |
408 | tr {
409 | border: 0;
410 | }
411 |
412 | tr>td:first-child, tr>th:first-child {
413 | padding-left: 1.25em;
414 | }
415 |
416 | tr>td:last-child, tr>th:last-child {
417 | padding-right: 1.25em;
418 | }
419 |
420 | td, th {
421 | line-height: 1.5em;
422 | padding: 0.5em 0.6em;
423 | text-align: left;
424 | vertical-align: top;
425 | }
426 |
427 | th {
428 | background-color: #efefef;
429 | background-image: -moz-linear-gradient(top, #ffffff, #eaeaea);
430 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), color-stop(1, #eaeaea));
431 | filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#ffffff', EndColorStr = '#eaeaea');
432 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#eaeaea')";
433 | color: #666666;
434 | font-weight: bold;
435 | line-height: 1.7em;
436 | padding: 0.2em 0.6em;
437 | }
438 |
439 | thead th {
440 | white-space: nowrap;
441 | }
442 |
443 | th a {
444 | display: block;
445 | text-decoration: none;
446 | }
447 |
448 | th a:link, th a:visited {
449 | color: #666666;
450 | }
451 |
452 | th a:hover, th a:focus {
453 | color: #333333;
454 | }
455 |
456 | th.sortable a {
457 | background-position: right;
458 | background-repeat: no-repeat;
459 | padding-right: 1.1em;
460 | }
461 |
462 | th.asc a {
463 | background-image: url(../images/skin/sorted_asc.gif);
464 | }
465 |
466 | th.desc a {
467 | background-image: url(../images/skin/sorted_desc.gif);
468 | }
469 |
470 | .odd {
471 | background: #f7f7f7;
472 | }
473 |
474 | .even {
475 | background: #ffffff;
476 | }
477 |
478 | th:hover, tr:hover {
479 | background: #E1F2B6;
480 | }
481 |
482 | /* PAGINATION */
483 |
484 | .pagination {
485 | border-top: 0;
486 | margin: 0;
487 | padding: 0.3em 0.2em;
488 | text-align: center;
489 | -moz-box-shadow: 0 0 3px 1px #AAAAAA;
490 | -webkit-box-shadow: 0 0 3px 1px #AAAAAA;
491 | box-shadow: 0 0 3px 1px #AAAAAA;
492 | background-color: #EFEFEF;
493 | }
494 |
495 | .pagination a,
496 | .pagination .currentStep {
497 | color: #666666;
498 | display: inline-block;
499 | margin: 0 0.1em;
500 | padding: 0.25em 0.7em;
501 | text-decoration: none;
502 | -moz-border-radius: 0.3em;
503 | -webkit-border-radius: 0.3em;
504 | border-radius: 0.3em;
505 | }
506 |
507 | .pagination a:hover, .pagination a:focus,
508 | .pagination .currentStep {
509 | background-color: #999999;
510 | color: #ffffff;
511 | outline: none;
512 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
513 | }
514 |
515 | .no-borderradius .pagination a:hover, .no-borderradius .pagination a:focus,
516 | .no-borderradius .pagination .currentStep {
517 | background-color: transparent;
518 | color: #444444;
519 | text-decoration: underline;
520 | }
521 |
522 | /* ACTION BUTTONS */
523 |
524 | .buttons {
525 | background-color: #efefef;
526 | overflow: hidden;
527 | padding: 0.3em;
528 | -moz-box-shadow: 0 0 3px 1px #aaaaaa;
529 | -webkit-box-shadow: 0 0 3px 1px #aaaaaa;
530 | box-shadow: 0 0 3px 1px #aaaaaa;
531 | margin: 0.1em 0 0 0;
532 | border: none;
533 | }
534 |
535 | .buttons input,
536 | .buttons a {
537 | background-color: transparent;
538 | border: 0;
539 | color: #666666;
540 | cursor: pointer;
541 | display: inline-block;
542 | margin: 0 0.25em 0;
543 | overflow: visible;
544 | padding: 0.25em 0.7em;
545 | text-decoration: none;
546 |
547 | -moz-border-radius: 0.3em;
548 | -webkit-border-radius: 0.3em;
549 | border-radius: 0.3em;
550 | }
551 |
552 | .buttons input:hover, .buttons input:focus,
553 | .buttons a:hover, .buttons a:focus {
554 | background-color: #999999;
555 | color: #ffffff;
556 | outline: none;
557 | text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
558 | -moz-box-shadow: none;
559 | -webkit-box-shadow: none;
560 | box-shadow: none;
561 | }
562 |
563 | .no-borderradius .buttons input:hover, .no-borderradius .buttons input:focus,
564 | .no-borderradius .buttons a:hover, .no-borderradius .buttons a:focus {
565 | background-color: transparent;
566 | color: #444444;
567 | text-decoration: underline;
568 | }
569 |
570 | .buttons .delete, .buttons .edit, .buttons .save {
571 | background-position: 0.7em center;
572 | background-repeat: no-repeat;
573 | text-indent: 25px;
574 | }
575 |
576 | .ie6 .buttons input.delete, .ie6 .buttons input.edit, .ie6 .buttons input.save,
577 | .ie7 .buttons input.delete, .ie7 .buttons input.edit, .ie7 .buttons input.save {
578 | padding-left: 36px;
579 | }
580 |
581 | .buttons .delete {
582 | background-image: url(../images/skin/database_delete.png);
583 | }
584 |
585 | .buttons .edit {
586 | background-image: url(../images/skin/database_edit.png);
587 | }
588 |
589 | .buttons .save {
590 | background-image: url(../images/skin/database_save.png);
591 | }
592 |
593 | a.skip {
594 | position: absolute;
595 | left: -9999px;
596 | }
597 |
598 | .contact-container {
599 | margin: 20px 0 0 20px;
600 | padding: 20px 20px 20px 20px;
601 | }
--------------------------------------------------------------------------------
/web-app/WEB-INF/tld/c.tld:
--------------------------------------------------------------------------------
1 |
2 |
3 |