]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1809] Users - Manage section sort by name doesn't work as expected
authorOlivier Lamy <olamy@apache.org>
Tue, 6 May 2014 06:12:14 +0000 (16:12 +1000)
committerOlivier Lamy <olamy@apache.org>
Tue, 6 May 2014 06:12:14 +0000 (16:12 +1000)
archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js

index 556a2b27a44d29b834e153f668d1f0e8083b3282..684f6b3c56dbd4aa1f038b189a2d050a29dd8d33 100644 (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
index 0a3f19eadf5b4d1435e9142fbeadeaf71f0c7996..827a206536e0ba8f5cdba7934f68331c8ec12985 100644 (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());
       });
     };