mirror of https://github.com/apache/archiva.git
fix button label and apply a better solution for filtering
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1565992 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
33d54b050f
commit
b99013fe90
|
@ -266,7 +266,7 @@ users.grid.filter.locked=Locked
|
||||||
users.grid.filter.not.locked=Not Locked
|
users.grid.filter.not.locked=Not Locked
|
||||||
users.grid.filter.pwd.change.required=Password Change required
|
users.grid.filter.pwd.change.required=Password Change required
|
||||||
users.grid.filter.pwd.change.not.required=Password Change not required
|
users.grid.filter.pwd.change.not.required=Password Change not required
|
||||||
users.grid.filter=Filter
|
users.grid.filter=Clear filter
|
||||||
|
|
||||||
#roles management
|
#roles management
|
||||||
roles.management.header=Roles Management
|
roles.management.header=Roles Management
|
||||||
|
|
|
@ -25,6 +25,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
|
||||||
UsersViewModel=function() {
|
UsersViewModel=function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.users = ko.observableArray([]);
|
this.users = ko.observableArray([]);
|
||||||
|
|
||||||
this.originalUsers=ko.observableArray([]);
|
this.originalUsers=ko.observableArray([]);
|
||||||
|
|
||||||
this.gridViewModel = new ko.simpleGrid.viewModel({
|
this.gridViewModel = new ko.simpleGrid.viewModel({
|
||||||
|
@ -55,7 +56,6 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
|
||||||
});
|
});
|
||||||
clearFilters=function(){
|
clearFilters=function(){
|
||||||
self.users(self.originalUsers());
|
self.users(self.originalUsers());
|
||||||
|
|
||||||
};
|
};
|
||||||
filterLocked=function(){
|
filterLocked=function(){
|
||||||
var founds=[];
|
var founds=[];
|
||||||
|
@ -282,7 +282,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
|
||||||
|
|
||||||
applyAutocompleteOnHeaderUsers=function(property,usersViewModel){
|
applyAutocompleteOnHeaderUsers=function(property,usersViewModel){
|
||||||
var founds=[];
|
var founds=[];
|
||||||
$(usersViewModel.users()).each(function(idx,user){
|
$(usersViewModel.originalUsers()).each(function(idx,user){
|
||||||
if(user[property] && user[property]()){
|
if(user[property] && user[property]()){
|
||||||
founds.push(user[property]());
|
founds.push(user[property]());
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
|
||||||
$("#main-content").find("#users-grid-filter-auto-"+property ).on('typeahead:selected', function(obj, datum) {
|
$("#main-content").find("#users-grid-filter-auto-"+property ).on('typeahead:selected', function(obj, datum) {
|
||||||
var users=[];
|
var users=[];
|
||||||
|
|
||||||
$(usersViewModel.users()).each(function(idx,user){
|
$(usersViewModel.originalUsers()).each(function(idx,user){
|
||||||
if(user[property] && user[property]() && user[property]().indexOf(datum.value)>=0){
|
if(user[property] && user[property]() && user[property]().indexOf(datum.value)>=0){
|
||||||
users.push(user);
|
users.push(user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue