branch develop updated (e3cc795 -> 07d47bf)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git from e3cc795 Add a tooltip to explain contributors meaning on project details. internal-test #6746 new 07d47bf try to fix error message occurence when save document is too slow internal-test #6744 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 07d47bf4b0cc35cdccad5cf5fc73b4ea07d20ef1 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Mar 2 17:03:21 2015 +0100 try to fix error message occurence when save document is too slow internal-test #6744 Summary of changes: coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 11 +++++++---- coselmar-ui/src/main/webapp/views/documents/editDocument.html | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
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 07d47bf4b0cc35cdccad5cf5fc73b4ea07d20ef1 Author: Yannick Martel <martel@©odelutin.com> Date: Mon Mar 2 17:03:21 2015 +0100 try to fix error message occurence when save document is too slow internal-test #6744 --- coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 11 +++++++---- coselmar-ui/src/main/webapp/views/documents/editDocument.html | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index f8eb6e7..b49fcac 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -287,6 +287,7 @@ coselmarControllers.controller("DocumentViewCtrl", $scope.container = {baseUrl : coselmarConfig.BASE_URL}; $scope.upload = {}; $scope.users = []; + $scope.hasErrors = false; $scope.editSession = $routeParams.edit ? $routeParams.edit : false; @@ -361,17 +362,19 @@ coselmarControllers.controller("DocumentViewCtrl", $scope.saveDocument = function(){ - if (angular.isDate($scope.document.publicationDate)) { - $scope.document.publicationDate = $scope.document.publicationDate.getTime(); - } - // Call service to save document if ($scope.document.keywords.length == 0) { $scope.keywordsError = true; + $scope.hasErrors = true; } else if ($scope.isFormValid()) { $scope.hasErrors = false; + // Adapt publicationDate to send a timestamp + if (angular.isDate($scope.document.publicationDate)) { + $scope.document.publicationDate = $scope.document.publicationDate.getTime(); + } + documentService.saveDocument($scope.document, function() { if ($scope.upload.file) { var documentId = $scope.document.id; diff --git a/coselmar-ui/src/main/webapp/views/documents/editDocument.html b/coselmar-ui/src/main/webapp/views/documents/editDocument.html index afc4e2f..4b73fa5 100644 --- a/coselmar-ui/src/main/webapp/views/documents/editDocument.html +++ b/coselmar-ui/src/main/webapp/views/documents/editDocument.html @@ -293,7 +293,7 @@ </div> <div> - <div ng-if="documentForm.$invalid || hasErrors" class="has-error"> + <div ng-if="hasErrors" class="has-error"> <div class="text-center help-block">{{ 'common.message.missingMandatoryFields' | translate }}</div> </div> <div class="actions"> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm