This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit e724251dbf6710cd6263bc753e19ccf42be4d262 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Feb 2 11:31:54 2015 +0100 overwrite angularui-boostrap datepicker directive to bind correctly date in input --- .../coselmar/services/v1/QuestionsWebService.java | 8 +++++--- coselmar-ui/pom.xml | 2 -- .../src/main/webapp/js/coselmar-controllers.js | 21 ++++++++++++++++++++- pom.xml | 15 +++++++++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/QuestionsWebService.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/QuestionsWebService.java index 3d5887b..9e3bdcc 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/QuestionsWebService.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/QuestionsWebService.java @@ -306,9 +306,11 @@ public class QuestionsWebService extends CoselmarWebServiceSupport { // Participant group should be deleted, and so, we should remove it from Document using this group CoselmarUserGroup participantGroup = question.getParticipants(); - List<Document> documents = getDocumentDao().forRestrictedListContains(participantGroup).findAll(); - for (Document document : documents) { - document.removeRestrictedList(participantGroup); + if (participantGroup != null) { + List<Document> documents = getDocumentDao().forRestrictedListContains(participantGroup).findAll(); + for (Document document : documents) { + document.removeRestrictedList(participantGroup); + } } // Question become unavailable diff --git a/coselmar-ui/pom.xml b/coselmar-ui/pom.xml index 1252028..dd2e721 100644 --- a/coselmar-ui/pom.xml +++ b/coselmar-ui/pom.xml @@ -42,14 +42,12 @@ <dependency> <groupId>org.webjars</groupId> <artifactId>angularjs</artifactId> - <version>1.3.6</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.webjars</groupId> <artifactId>bootstrap</artifactId> - <version>3.3.1</version> <scope>runtime</scope> </dependency> diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index 35509b5..66e274e 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -711,6 +711,10 @@ coselmarControllers.controller("QuestionCtrl", ['$scope', '$route', '$routeParam // success : just get the questions $scope.question = question; + if(question.deadline) { + $scope.question.deadline = new Date(question.deadline); + } + // update scope about current user : if he is participant, more option enable in ui if ($scope.question.participants) { for (var i = 0; i < $scope.question.participants.length; i++) { @@ -1268,4 +1272,19 @@ coselmarControllers.directive('ngConfirmClick', ['$modal', function($modal) { } } -}]); \ No newline at end of file +}]); + +/** + * Must override datepicker directive to prevent error with dateformat + * see : https://github.com/angular-ui/bootstrap/issues/2659 + */ +coselmarControllers.directive('datepickerPopup', function (){ + return { + restrict: 'EAC', + require: 'ngModel', + link: function(scope, element, attr, controller) { + //remove the default formatter from the input directive to prevent conflict + controller.$formatters.shift(); + } + } +}); \ No newline at end of file diff --git a/pom.xml b/pom.xml index 849a181..be4aa3a 100644 --- a/pom.xml +++ b/pom.xml @@ -142,6 +142,8 @@ <tomcatEmbedVersion>7.0.50</tomcatEmbedVersion> + <angularVersion>1.3.6</angularVersion> + <bootstrapVersion>3.3.1</bootstrapVersion> <angularUiSelectVersion>0.9.0</angularUiSelectVersion> <angularUiBootstrapVersion>0.12.0</angularUiBootstrapVersion> <angularTranslateVersion>2.5.2</angularTranslateVersion> @@ -374,6 +376,19 @@ </dependency> <!-- JS librairie --> + + <dependency> + <groupId>org.webjars</groupId> + <artifactId>angularjs</artifactId> + <version>${angularVersion}</version> + </dependency> + + <dependency> + <groupId>org.webjars</groupId> + <artifactId>bootstrap</artifactId> + <version>${bootstrapVersion}</version> + </dependency> + <dependency> <groupId>org.webjars</groupId> <artifactId>angular-ui-select</artifactId> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.