diff options
author | Olivier Lamy <olamy@apache.org> | 2014-02-08 12:01:52 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-02-08 12:01:52 +0000 |
commit | 28295ea9cf470b4dc18731b02897ff1febd7a6f2 (patch) | |
tree | 0cfd1f0b0277c922962721629d0a4c3fa09e27af | |
parent | 476ce7eb5fffc7069a3288e1af09e0460309d7a1 (diff) | |
download | archiva-28295ea9cf470b4dc18731b02897ff1febd7a6f2.tar.gz archiva-28295ea9cf470b4dc18731b02897ff1febd7a6f2.zip |
fix filter on users grid
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1565987 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js index 2f13804a6..1c83d9967 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js @@ -287,9 +287,22 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) { founds.push(user[property]()); } }); + //var filteredHeader = ; $("#main-content").find("#users-grid-filter-auto-"+property ).typeahead({ - local: founds + local: founds, + name: 'users-'+property+'-'+$.now() }); + $("#main-content").find("#users-grid-filter-auto-"+property ).on('typeahead:selected', function(obj, datum) { + var users=[]; + + $(usersViewModel.users()).each(function(idx,user){ + if(user[property] && user[property]() && user[property]().indexOf(datum.value)>=0){ + users.push(user); + } + }); + usersViewModel.users(users); + }); + } /** |