fix filter on users grid

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1565987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2014-02-08 12:01:52 +00:00
parent 476ce7eb5f
commit 28295ea9cf
1 changed files with 14 additions and 1 deletions

View File

@ -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);
});
}
/**