diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-11 17:39:08 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-16 11:10:00 +0200 |
commit | fee62ac61c1cecb37e283fc6f9faf0251389226f (patch) | |
tree | a0b26fe0459cdd15b910398ea3f97c5ffd945cae /settings | |
parent | 7d8b728066987bd312b3225eff6cff67ca6a610a (diff) | |
download | nextcloud-server-fee62ac61c1cecb37e283fc6f9faf0251389226f.tar.gz nextcloud-server-fee62ac61c1cecb37e283fc6f9faf0251389226f.zip |
Always keep "Everyone" and "admin" at the top of the list
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/groups.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 0fcca39843f..d5e37ff8d63 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -63,6 +63,20 @@ GroupList = { var lis = $userGroupList.find('.isgroup').get(); lis.sort(function (a, b) { + // "Everyone" always at the top + if ($(a).data('gid') === '_everyone') { + return -1; + } else if ($(b).data('gid') === '_everyone') { + return 1; + } + + // "admin" always as second + if ($(a).data('gid') === 'admin') { + return -1; + } else if ($(b).data('gid') === 'admin') { + return 1; + } + return UserList.alphanum( $(a).find('a span').text(), $(b).find('a span').text() |