mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 20:59:43 +02:00
fix for user icons when searching for users to add to group in acp>manage>group page
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
"use strict";
|
||||
/*global define, templates, socket, ajaxify, app, bootbox, translator */
|
||||
/*global define, templates, socket, ajaxify, app, bootbox */
|
||||
|
||||
define('admin/manage/group', [
|
||||
'forum/groups/memberlist',
|
||||
'iconSelect',
|
||||
'admin/modules/colorpicker'
|
||||
], function(memberList, iconSelect, colorpicker) {
|
||||
'admin/modules/colorpicker',
|
||||
'translator'
|
||||
], function(memberList, iconSelect, colorpicker, translator) {
|
||||
var Groups = {};
|
||||
|
||||
Groups.init = function() {
|
||||
@@ -56,9 +57,11 @@ define('admin/manage/group', [
|
||||
'data-uid': results.users[x].uid,
|
||||
'data-username': results.users[x].username,
|
||||
'data-userslug': results.users[x].userslug,
|
||||
'data-picture': results.users[x].picture
|
||||
'data-picture': results.users[x].picture,
|
||||
'data-usericon-bgColor': results.users[x]['icon:bgColor'],
|
||||
'data-usericon-text': results.users[x]['icon:text']
|
||||
})
|
||||
.append($('<img />').attr('src', results.users[x].picture))
|
||||
.append(results.users[x].picture ? $('<img />').attr('src', results.users[x].picture) : $('<div />').addClass('user-icon').css('background-color', results.users[x]['icon:bgColor']).html(results.users[x]['icon:text']))
|
||||
.append($('<span />').html(results.users[x].username));
|
||||
|
||||
groupDetailsSearchResults.append(foundUser);
|
||||
@@ -86,7 +89,9 @@ define('admin/manage/group', [
|
||||
uid: userLabel.attr('data-uid'),
|
||||
username: userLabel.attr('data-username'),
|
||||
userslug: userLabel.attr('data-userslug'),
|
||||
picture: userLabel.attr('data-picture')
|
||||
picture: userLabel.attr('data-picture'),
|
||||
"icon:bgColor": userLabel.attr('data-usericon-bgColor'),
|
||||
"icon:text": userLabel.attr('data-usericon-text')
|
||||
};
|
||||
|
||||
templates.parse('partials/groups/memberlist', 'members', {group: {isOwner: ajaxify.data.group.isOwner, members: [member]}}, function(html) {
|
||||
|
||||
Reference in New Issue
Block a user