aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-02-08 12:02:26 +0000
committerOlivier Lamy <olamy@apache.org>2014-02-08 12:02:26 +0000
commitb99013fe907c7d543906c5b9ebc1562aec4535c9 (patch)
tree9b4c0585718645b97d51393be299a7b1e93bbac4
parent33d54b050f32b9077d0efb7a80ac4d3e90db39d1 (diff)
downloadarchiva-b99013fe907c7d543906c5b9ebc1562aec4535c9.tar.gz
archiva-b99013fe907c7d543906c5b9ebc1562aec4535c9.zip
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
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
index 09c4e26c1..37292cd56 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
@@ -266,7 +266,7 @@ users.grid.filter.locked=Locked
users.grid.filter.not.locked=Not Locked
users.grid.filter.pwd.change.required=Password Change 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.header=Roles Management
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 1c83d9967..0a3f19ead 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
@@ -25,6 +25,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
UsersViewModel=function() {
var self = this;
this.users = ko.observableArray([]);
+
this.originalUsers=ko.observableArray([]);
this.gridViewModel = new ko.simpleGrid.viewModel({
@@ -49,13 +50,12 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
],
pageSize: 10,
gridUpdateCallBack: function(){
- $.log("gridUpdateCallBack users result");
+ $.log("gridUpdateCallBack users result");
applyAutocompleteOnUsersHeaders(self);
}
});
clearFilters=function(){
self.users(self.originalUsers());
-
};
filterLocked=function(){
var founds=[];
@@ -282,7 +282,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
applyAutocompleteOnHeaderUsers=function(property,usersViewModel){
var founds=[];
- $(usersViewModel.users()).each(function(idx,user){
+ $(usersViewModel.originalUsers()).each(function(idx,user){
if(user[property] && 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) {
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){
users.push(user);
}