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
UsersViewModel=function() {
var self = this;
this.users = ko.observableArray([]);
+
this.originalUsers=ko.observableArray([]);
this.gridViewModel = new ko.simpleGrid.viewModel({
],
pageSize: 10,
gridUpdateCallBack: function(){
- $.log("gridUpdateCallBack users result");
+ $.log("gridUpdateCallBack users result");
applyAutocompleteOnUsersHeaders(self);
}
});
clearFilters=function(){
self.users(self.originalUsers());
-
};
filterLocked=function(){
var founds=[];
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]());
}
$("#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);
}