[MRM-1809] Users - Manage section sort by name doesn't work as expected

This commit is contained in:
Olivier Lamy 2014-05-06 16:12:14 +10:00
parent d533b85919
commit 8e8148886b
2 changed files with 5 additions and 5 deletions

View File

@ -240,7 +240,7 @@ menu.users-runtime-configuration=Users Runtime Configuration
user.change.password.required=Change password required
users.grid.tab.title=Users
users.list=Users List
users.sort.byname=Sort by Name
users.sort.byname=Sort by User Name
effective.roles.edit=Edit Roles
locked=Locked
validated=Validated

View File

@ -131,21 +131,21 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,typeahead) {
lock = function(user){
clearUserMessages();
user.lock();
}
};
unlock = function(user){
clearUserMessages();
user.unlock();
}
};
passwordChangeRequire = function(user,forceChangedPassword){
clearUserMessages();
user.changePasswordChangeRequired(forceChangedPassword);
}
};
this.sortByName = function() {
this.users.sort(function(a, b) {
return a.username < b.username ? -1 : 1;
return a.username().localeCompare(b.username());
});
};