mirror of https://github.com/apache/archiva.git
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:
parent
476ce7eb5f
commit
28295ea9cf
|
@ -287,9 +287,22 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
|
||||||
founds.push(user[property]());
|
founds.push(user[property]());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//var filteredHeader = ;
|
||||||
$("#main-content").find("#users-grid-filter-auto-"+property ).typeahead({
|
$("#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);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue