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 9840659dd2b341f02ea766cdb7c81f41bba436fd Author: Yannick Martel <martel@©odelutin.com> Date: Wed Jan 13 12:17:55 2016 +0100 fixes #7853 fix search engine on Users --- .../src/main/webapp/js/coselmar-controllers.js | 26 +++++++++++----------- .../src/main/webapp/views/users/searchPart.html | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index 621a56e..5069bdf 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -562,20 +562,19 @@ coselmarControllers.directive('ngFileModel', ['$parse', function ($parse) { coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', '$location', 'userService', 'notify', function($scope, $route, $routeParams, $location, userService, notify){ //manage keywords if given - $scope.search = { searchKeywords : []}; - $scope.example = { active : "true", role : ''}; + $scope.example = { fullTextSearch : [], active : "true", role : ''}; var keywords = $routeParams.keywords; if (Array.isArray(keywords)) { - $scope.search.searchKeywords = keywords; + $scope.example.fullTextSearch = keywords; } else if (keywords) { - $scope.search.searchKeywords.push(keywords); + $scope.example.fullTextSearch.push(keywords); } var showDisable = $routeParams.showDisable; if (showDisable) { - $scope.search.showDisable = showDisable; + $scope.example.showDisable = showDisable; } else { - $scope.search.showDisable = false; + $scope.example.showDisable = false; } var advancedSearch = $routeParams.advancedSearch; @@ -585,7 +584,7 @@ coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', $scope.advanced = false; } - userService.getUsers($scope.search.searchKeywords, $scope.search.showDisable, function(users) { + userService.getUsers($scope.example.fullTextSearch, $scope.example.showDisable, function(users) { $scope.users = users; }); @@ -639,11 +638,12 @@ coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', }; $scope.searchUsers = function(){ - $location.search('keywords', $scope.search.searchKeyword); - $location.search('showDisable', $scope.search.showDisable); + $location.search('keywords', $scope.example.fullTextSearch); + $location.search('showDisable', $scope.example.showDisable); }; $scope.advancedSearchUsers = function() { + console.log($scope.example.role); if ($scope.example.role && $scope.example.role == "ALL") { // Because "ALL" role is just a hack to select no role, remove it from example delete $scope.example.role; @@ -651,10 +651,10 @@ coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', userService.getAdvancedUsers($scope.example, function(users){ $scope.users = users; - if (!$scope.example.role) { - // replace "ALL" as role if there is no specified role - $scope.example.role = "ALL"; - }; +// if (!$scope.example.role) { +// // replace "ALL" as role if there is no specified role +// $scope.example.role = ""; +// }; }); }; diff --git a/coselmar-ui/src/main/webapp/views/users/searchPart.html b/coselmar-ui/src/main/webapp/views/users/searchPart.html index 16d7afd..dd5d238 100644 --- a/coselmar-ui/src/main/webapp/views/users/searchPart.html +++ b/coselmar-ui/src/main/webapp/views/users/searchPart.html @@ -36,11 +36,11 @@ <form class="form-inline pull-right search-zone" name="userOptions" role="userOptions" ng-submit="searchUsers()" ng-show="!advanced"> <div class="form-group"> - <input type="checkbox" class="form-control" ng-model="search.showDisable" /> + <input type="checkbox" class="form-control" ng-model="example.showDisable" /> <span>{{ 'user.button.showDisable' | translate }}</span> </div> <div class="form-group marginLeft20"> - <input type="search" class="form-control" placeholder="Search an user" ng-model="search.searchKeyword" /> + <input type="search" class="form-control" placeholder="Search an user" ng-model="example.fullTextSearch" ng-list/> </div> <div class="form-group"> <button type="submit" class="btn btn-primary glyphicon glyphicon-search"></button> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.