diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-16 17:29:03 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-16 17:29:03 +0200 |
commit | d2743e6ad66ba6827a0e49487ed83667671895c8 (patch) | |
tree | 1d50bf0f5364779e3f9e407a126d5694e69f4f00 /settings/js | |
parent | 4669ea38357f3f33caaf056d859e6318b75b72e1 (diff) | |
parent | f2001a48a4e91bc6427a2a63ba9022ceaf1d305d (diff) | |
download | nextcloud-server-d2743e6ad66ba6827a0e49487ed83667671895c8.tar.gz nextcloud-server-d2743e6ad66ba6827a0e49487ed83667671895c8.zip |
Merge pull request #7254 from owncloud/core-sortalgo
Fixed JS sort comparator to be consistent between JS and PHP
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/users/users.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 86ed43d958e..f39f8c2c064 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -192,13 +192,15 @@ var UserList = { var rows = $userListBody.find('tr').get(); rows.sort(function(a, b) { + // FIXME: inefficient way of getting the names, + // better use a data attribute a = $(a).find('td.name').text(); b = $(b).find('td.name').text(); var firstSort = UserList.preSortSearchString(a, b); if(typeof firstSort !== 'undefined') { return firstSort; } - return UserList.alphanum(a, b); + return OC.Util.naturalSortCompare(a, b); }); var items = []; |