|
|
@ -2826,13 +2826,13 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
UIElements.displayAvatar = function (common, $container, href, name, cb) {
|
|
|
|
UIElements.displayAvatar = function (common, $container, href, name, cb) {
|
|
|
|
var displayDefault = function () {
|
|
|
|
var displayDefault = function () {
|
|
|
|
var text = getFirstEmojiOrCharacter(name);
|
|
|
|
var text = typeof(href) === "string" ? href : getFirstEmojiOrCharacter(name);
|
|
|
|
var $avatar = $('<span>', {'class': 'cp-avatar-default'}).text(text);
|
|
|
|
var $avatar = $('<span>', {'class': 'cp-avatar-default'}).text(text);
|
|
|
|
$container.append($avatar);
|
|
|
|
$container.append($avatar);
|
|
|
|
if (cb) { cb(); }
|
|
|
|
if (cb) { cb(); }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!window.Symbol) { return void displayDefault(); } // IE doesn't have Symbol
|
|
|
|
if (!window.Symbol) { return void displayDefault(); } // IE doesn't have Symbol
|
|
|
|
if (!href) { return void displayDefault(); }
|
|
|
|
if (typeof(href) !== "string" || href.length === 1) { return void displayDefault(); }
|
|
|
|
|
|
|
|
|
|
|
|
var centerImage = function ($img, $image, img) {
|
|
|
|
var centerImage = function ($img, $image, img) {
|
|
|
|
var w = img.width;
|
|
|
|
var w = img.width;
|
|
|
|