Merge pull request #4110 from pichalite/master

fix for user icons when searching to add to group in acp>manage>group page
v1.18.x
Julian Lam 9 years ago
commit 60c86400d7

@ -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) {

Loading…
Cancel
Save