From 334ef5b8920529cfaff87148c12b40e3bbfef727 Mon Sep 17 00:00:00 2001 From: mfakih Date: Wed, 29 Jan 2020 14:18:02 +0200 Subject: [PATCH] 1.2.0 Now the Tomcat bundle can easily support more than one instance of the application, by duplicating the war file under a different name, and creating the corresponding context file under conf/Catalina/locahost/.xml --- grails-app/conf/application.yml | 12 +- .../controllers/ker/ExportController.groovy | 4 +- grails-app/domain/security/Role.groovy | 2 +- grails-app/domain/security/User.groovy | 2 +- grails-app/domain/security/UserRole.groovy | 2 +- grails-app/views/appCalendar/main.gsp | 35 ++-- grails-app/views/appKanban/_regions.gsp | 4 +- grails-app/views/gTemplates/_addForm.gsp | 154 ++++++++++-------- grails-app/views/gTemplates/_box.gsp | 11 +- .../resources/public/css/main-calendar.css | 4 + src/main/resources/public/css/main-kanban.css | 6 +- 11 files changed, 135 insertions(+), 101 deletions(-) diff --git a/grails-app/conf/application.yml b/grails-app/conf/application.yml index 01c12f4..dae98b2 100644 --- a/grails-app/conf/application.yml +++ b/grails-app/conf/application.yml @@ -115,7 +115,7 @@ environments: pooled: true jmxExport: true driverClassName: org.h2.Driver - url: jdbc:h2:./h2Db;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE + url: jdbc:h2:./db/h2Db;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE username: sa password: '' properties: @@ -162,14 +162,13 @@ environments: testOnReturn: false jdbcInterceptors: ConnectionState defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED - mysql: + production2: dataSource: dbCreate: update - url: jdbc:mysql://localhost:3306/db_nibras + jndiName: java:comp/env/jdbc/db_nibras2 + pooled: true driverClassName: com.mysql.jdbc.Driver dialect: org.hibernate.dialect.MySQL5InnoDBDialect - username: nibras - password: password properties: jmxEnabled: true initialSize: 5 @@ -187,8 +186,7 @@ environments: testWhileIdle: true testOnReturn: false jdbcInterceptors: ConnectionState - defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED - test: + defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED test: dataSource: dbCreate: update url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE diff --git a/grails-app/controllers/ker/ExportController.groovy b/grails-app/controllers/ker/ExportController.groovy index 960c9dc..ca84081 100644 --- a/grails-app/controllers/ker/ExportController.groovy +++ b/grails-app/controllers/ker/ExportController.groovy @@ -236,7 +236,7 @@ class ExportController { title : StringUtils.abbreviate(title, 80), description : it.summary + '|' + it.description, backgroundColor: '#fff',//it.type?.color ?: '#F7F9EE', - borderColor : 'darkgreen', + borderColor : 'darkgrey', textColor : 'black',//it.type?.style ?: '#515150', url : OperationController.getPath('app.URL') + '/page/record/' + it.id + '?entityCode=J', @@ -259,7 +259,7 @@ class ExportController { title : StringUtils.abbreviate(title, 80), description : it.summary + '|' + it.description, backgroundColor: '#fff',//it.type?.color ?: '#F7F9EE', - borderColor : 'darkred', + borderColor : 'darkgreen', textColor : 'black',//it.type?.style ?: '#515150', url : OperationController.getPath('app.URL') + '/page/record/' + it.id + '?entityCode=P', diff --git a/grails-app/domain/security/Role.groovy b/grails-app/domain/security/Role.groovy index 28d53b8..6ac90a2 100644 --- a/grails-app/domain/security/Role.groovy +++ b/grails-app/domain/security/Role.groovy @@ -18,7 +18,7 @@ class Role implements Serializable { } static mapping = { - table '`security_role`' + table 'security_role' cache true } } diff --git a/grails-app/domain/security/User.groovy b/grails-app/domain/security/User.groovy index 2bd10e7..8703c27 100644 --- a/grails-app/domain/security/User.groovy +++ b/grails-app/domain/security/User.groovy @@ -28,7 +28,7 @@ class User implements Serializable { } static mapping = { - table '`security_user`' + table 'security_user' password column: '`password`' } diff --git a/grails-app/domain/security/UserRole.groovy b/grails-app/domain/security/UserRole.groovy index d489930..9b80eda 100644 --- a/grails-app/domain/security/UserRole.groovy +++ b/grails-app/domain/security/UserRole.groovy @@ -81,7 +81,7 @@ class UserRole implements Serializable { } static mapping = { - table '`security_user_role`' + table 'security_user_role' id composite: ['user', 'role'] version false } diff --git a/grails-app/views/appCalendar/main.gsp b/grails-app/views/appCalendar/main.gsp index 31ca45e..d71a517 100644 --- a/grails-app/views/appCalendar/main.gsp +++ b/grails-app/views/appCalendar/main.gsp @@ -58,10 +58,11 @@ isRTL: false, // locale: 'ar', plugins: ['bootstrap', 'interaction', 'dayGrid', 'timeGrid', 'list' ], - - height: 'parent', + aspectRatio: 1, + contentHeight: 800, + height: 700, fixedWeekCount: false, - // shouldRedistribute: true, +// shouldRedistribute: true, header: { left: 'prev,next today', center: 'title', @@ -72,10 +73,10 @@ buttonText: 'Month', columnHead: true },timeGridWeek: { - buttonText: 'Week (grid)', + buttonText: 'Grid Week', columnHead: true },dayGridWeek: { - buttonText: 'Week (list)', + buttonText: 'List Week', columnHead: true } // ,listWeek: { @@ -121,10 +122,10 @@ // day:'' // Monday 19.07 // }, // lazyFetching: true, - // firstHour: 5, + firstHour: '09:00', // minTime: 5, minTime: '05:00', - slotDuration: '00:30', + slotDuration: '00:60', // showNonCurrentDates: false, // dayCount: 31, weekNumbers: true, @@ -140,7 +141,9 @@ var modal = jQuery('#login-form').modal(); $('#login-form').on($.modal.AFTER_CLOSE, function(event, modal) { - window.location.href = window.location; +// window.location.href = window.location; + calendar.refetchEvents() + }); // @@ -255,7 +258,7 @@ } td{ - direction: rtl; + /*direction: rtl;*/ text-align: right; } @@ -278,12 +281,12 @@ } - .prompt { - width: 500px; - height: 200px; - background: black; - color: #FFA500; - } + /*.prompt {*/ + /*width: 500px;*/ + /*height: 200px;*/ + /*background: black;*/ + /*color: #FFA500;*/ + /*}*/ /*.hover-end{padding:0;margin:0;font-size:75%;text-align:center;position:absolute;bottom:0;width:100%;opacity:.8}*/ @@ -301,7 +304,7 @@ -
+
diff --git a/grails-app/views/appKanban/_regions.gsp b/grails-app/views/appKanban/_regions.gsp index 62ebef6..8541a98 100644 --- a/grails-app/views/appKanban/_regions.gsp +++ b/grails-app/views/appKanban/_regions.gsp @@ -87,7 +87,7 @@ - + %{-- R* @@ -98,7 +98,7 @@ - + --}% G* diff --git a/grails-app/views/gTemplates/_addForm.gsp b/grails-app/views/gTemplates/_addForm.gsp index 688290a..f08c37a 100644 --- a/grails-app/views/gTemplates/_addForm.gsp +++ b/grails-app/views/gTemplates/_addForm.gsp @@ -26,6 +26,17 @@ noSelection="${['null': 'No book']}"/> + + + + + + + + @@ -111,6 +122,27 @@ + + + + + + + + + + + + @@ -241,14 +273,34 @@ - - - - + + + + + + + + + + + + + + +
+ + + +
+
+
-
+ @@ -289,15 +341,7 @@ %{----}% %{----}% - - - - - - + @@ -325,20 +369,7 @@ - - - - - - - - - - @@ -422,25 +453,6 @@ %{----}% %{----}% - - - - - - - - - - @@ -499,42 +511,54 @@ - - - - - - + + + + + +
+ + - - +
- -
- - - - + + + + + +
+ +
+ +
+ + + + + + + %{----}% %{----}% %{--Actual end date--}% - + @@ -96,13 +96,16 @@
- + ${record?.type?.code} ${record.department?.code}  - ${record?.context?.code} ${record?.course?.code} ${record.department?.code}  + + %{--@${record?.context?.code} --}% + c${record?.course?.code} d${record.department?.code}  + ?${record.status?.code} ${record.plannedDuration ? record.plannedDuration + "''" : ''} diff --git a/src/main/resources/public/css/main-calendar.css b/src/main/resources/public/css/main-calendar.css index 7e3359a..2ddc0b0 100644 --- a/src/main/resources/public/css/main-calendar.css +++ b/src/main/resources/public/css/main-calendar.css @@ -10,4 +10,8 @@ display: inline !important;; font-weight: bold !important; text-decoration: underline; +} + +.fc-time-grid .fc-slats td { + height: 1.9em !important; } \ No newline at end of file diff --git a/src/main/resources/public/css/main-kanban.css b/src/main/resources/public/css/main-kanban.css index fd99df9..8651834 100644 --- a/src/main/resources/public/css/main-kanban.css +++ b/src/main/resources/public/css/main-kanban.css @@ -390,8 +390,10 @@ td, th { th { font: 11px tahoma, verdana, arial, helvetica, sans-serif !important; /*font-weight:normal !important;*/ - background: #fff url(../images/skin/shadow.jpg); - color: #666; + background: #eee ; + /*fff url(../images/skin/shadow.jpg);*/ + + color: black; /*font-size: 12px;*/ /*font-weight: bold;*/ line-height: 17px;