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 993c8895145b30b256fa66bf427180a8dcb0556f Author: Yannick Martel <martel@©odelutin.com> Date: Thu Jan 15 11:37:28 2015 +0100 fix error on user search with active, inactive, both --- .../ifremer/coselmar/persistence/entity/CoselmarUserTopiaDao.java | 2 +- coselmar-ui/src/main/webapp/js/coselmar-controllers.js | 6 +++--- coselmar-ui/src/main/webapp/js/coselmar-user-services.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coselmar-persistence/src/main/java/fr/ifremer/coselmar/persistence/entity/CoselmarUserTopiaDao.java b/coselmar-persistence/src/main/java/fr/ifremer/coselmar/persistence/entity/CoselmarUserTopiaDao.java index efa1174..458da7d 100644 --- a/coselmar-persistence/src/main/java/fr/ifremer/coselmar/persistence/entity/CoselmarUserTopiaDao.java +++ b/coselmar-persistence/src/main/java/fr/ifremer/coselmar/persistence/entity/CoselmarUserTopiaDao.java @@ -128,7 +128,7 @@ public class CoselmarUserTopiaDao extends AbstractCoselmarUserTopiaDao<CoselmarU // only active ? if (!activeAndInactive) { - String activeCondition = DaoUtils.andAttributeEquals("CU", CoselmarUser.PROPERTY_ACTIVE, args, true); + String activeCondition = DaoUtils.andAttributeEquals("CU", CoselmarUser.PROPERTY_ACTIVE, args, example.isActive()); hqlBuilder.append(activeCondition); } diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index ddd2f53..9b457ee 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -205,14 +205,14 @@ coselmarControllers.directive('ngFileModel', ['$parse', function ($parse) { coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', '$location', 'userService', function($scope, $route, $routeParams, $location, userService){ //manage keywords if given - $scope.search = { searchKeyword : ''}; + $scope.search = { searchKeywords : []}; $scope.example = {}; var keywords = $routeParams.keywords; if (Array.isArray(keywords)) { - $scope.search.searchKeyword = keywords[0]; + $scope.search.searchKeywords = keywords; } else if (keywords) { - $scope.search.searchKeyword = keywords; + $scope.search.searchKeywords.push(keywords); } var showDisable = $routeParams.showDisable; if (showDisable) { diff --git a/coselmar-ui/src/main/webapp/js/coselmar-user-services.js b/coselmar-ui/src/main/webapp/js/coselmar-user-services.js index 52a44e3..309e67a 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-user-services.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-user-services.js @@ -70,7 +70,7 @@ function User(resource, config){ this.getUsers = function(searchKeywords, showDisable, successFunction){ // Load all users - var userResource = resource(baseURL, {'search' : {'fullTextSearch' : searchKeywords, 'activeAndInactive': showDisable}}); + var userResource = resource(baseURL, {'search' : {'fullTextSearch' : searchKeywords, 'activeAndInactive': showDisable, 'active': true}}); userResource.query(successFunction); }; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.