summaryrefslogtreecommitdiffstats
path: root/settings/js/users/groups.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/users/groups.js')
-rw-r--r--settings/js/users/groups.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 522291a00d7..cfc0fa26e95 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -17,11 +17,11 @@ GroupList = {
filter: '',
filterGroups: false,
- addGroup: function (gid, usercount) {
+ addGroup: function (gid, displayName, usercount) {
var $li = $userGroupList.find('.isgroup:last-child').clone();
$li
.data('gid', gid)
- .find('.groupname').text(gid);
+ .find('.groupname').text(displayName);
GroupList.setUserCount($li, usercount);
$li.appendTo($userGroupList);
@@ -128,22 +128,22 @@ GroupList = {
}
},
- createGroup: function (groupname) {
+ createGroup: function (groupid) {
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
- OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.createGroup, this, groupname));
+ OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.createGroup, this, groupid));
return;
}
$.post(
OC.generateUrl('/settings/users/groups'),
{
- id: groupname
+ id: groupid
},
function (result) {
if (result.groupname) {
var addedGroup = result.groupname;
UserList.availableGroups = $.unique($.merge(UserList.availableGroups, [addedGroup]));
- GroupList.addGroup(result.groupname);
+ GroupList.addGroup(groupid, result.groupname);
}
GroupList.toggleAddGroup();
}).fail(function(result) {
@@ -173,7 +173,7 @@ GroupList = {
GroupList.setUserCount(GroupList.getGroupLI(group.name).first(), group.usercount);
}
else {
- var $li = GroupList.addGroup(group.name, group.usercount);
+ var $li = GroupList.addGroup(group.id, group.name, group.usercount);
$li.addClass('appear transparent');
lis.push($li);