mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix group display name in the sidebar of the user management
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
db9b2398dd
commit
cb2fbdd214
2 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<!--List of Groups-->
|
||||
<?php foreach($_["groups"] as $group): ?>
|
||||
<li data-gid="<?php p($group['name']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup">
|
||||
<li data-gid="<?php p($group['id']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup">
|
||||
<a href="#" class="dorename">
|
||||
<span class="groupname"><?php p($group['name']); ?></span>
|
||||
</a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue