This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.forge.codelutin.com/coselmar.git commit 28c30623bb27eaae7614f13356afc7996fad49ff Author: Yannick Martel <martel@©odelutin.com> Date: Mon Feb 29 12:11:41 2016 +0100 fix advanced search on users, clean some code --- .../src/main/webapp/js/coselmar-controllers.js | 34 ++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js index d4a0163..fa89666 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar-controllers.js +++ b/coselmar-ui/src/main/webapp/js/coselmar-controllers.js @@ -794,8 +794,10 @@ coselmarControllers.controller("UsersCtrl", ['$scope', '$route', '$routeParams', }; $scope.$emit('dataLoading'); - userService.getAdvancedUsers($scope.example, function(users){ - $scope.users = users; + + userService.getPaginatedUsers($scope.example, function(paginatedUsers) { + $scope.paginationData = paginatedUsers; + $scope.$broadcast('pageLoaded', $scope.paginationData.currentPage, paginatedUsers.count) }, errorService.defaultFailOnCall, function() { $scope.$emit('dataLoaded'); } @@ -1278,6 +1280,18 @@ coselmarControllers.controller("QuestionCtrl", ['$scope', '$route', '$routeParam $scope.users = { 'participants' : [], 'clients': [], 'supervisors' : []}; + // function to be sure to have same user objects in list + var bindUsers = function(toDeal, index) { + if (toDeal) { + for(var i = 0; i < toDeal.length; i++) { + var user = toDeal[i]; + if (index[user.id]) { + toDeal[i] = index[user.id]; + } + } + } + }; + $scope.refreshExperts = function(searchKeyword) { var searchKeywords = []; if (searchKeyword && searchKeyword.length > 0) { @@ -1333,19 +1347,6 @@ coselmarControllers.controller("QuestionCtrl", ['$scope', '$route', '$routeParam $scope.refreshSupervisors(""); } - // function to be sure to have same user objects in list - var bindUsers = function(toDeal, index) { - if (toDeal) { - for(var i = 0; i < toDeal.length; i++) { - var user = toDeal[i]; - if (index[user.id]) { - toDeal[i] = index[user.id]; - } - } - } - - }; - if ($routeParams.questionId) { $scope.$emit('dataLoading'); questionsService.getQuestion($routeParams.questionId, @@ -1812,10 +1813,7 @@ coselmarControllers.controller('ModalSearchQuestionsCtrl', function ($scope, $ui }; questionsService.getQuestions($scope.searchOptions, function(questions) { - console.log("search !"); $scope.questions = $scope._filterQuestions(questions); - console.log("find !"); - console.log($scope.questions); }, errorService.defaultFailOnCall); $scope.searchQuestions = function(searchKeywords) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.