[Pkg-owncloud-commits] [owncloud] 05/205: Always keep "Everyone" and "admin" at the top of the list

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:36:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit fee62ac61c1cecb37e283fc6f9faf0251389226f
Author: Joas Schilling <nickvergessen at owncloud.com>
Date:   Thu Jun 11 17:39:08 2015 +0200

    Always keep "Everyone" and "admin" at the top of the list
---
 settings/js/users/groups.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 0fcca39..d5e37ff 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()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list