Fixes to user search

This commit is contained in:
Stian Thorgersen 2013-11-26 13:50:10 +00:00
parent f80522c6a5
commit 874727f927

View file

@ -119,12 +119,15 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
module.controller('UserListCtrl', function($scope, realm, User) {
$scope.realm = realm;
$scope.searchQuery = function() {
$scope.currentSearch = $scope.search;
$scope.searchLoaded = false;
if ($scope.search) {
$scope.currentSearch = $scope.search;
$scope.users = User.query({ realm: realm.id, search : $scope.search }, function() {
$scope.searchLoaded = true;
});
} else {
$scope.currentSearch = null;
$scope.users = null;
}
};
});