From: Olivier Lamy Date: Tue, 6 May 2014 06:12:14 +0000 (+1000) Subject: [MRM-1809] Users - Manage section sort by name doesn't work as expected X-Git-Tag: archiva-2.1.0~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e8148886bbcda08cfa7f607a2468d18ad201e2e;p=archiva.git [MRM-1809] Users - Manage section sort by name doesn't work as expected --- 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 556a2b27a..684f6b3c5 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 @@ -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 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 0a3f19ead..827a20653 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 @@ -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()); }); };