|
|
@ -1657,7 +1657,7 @@ define([
|
|
|
|
//var $userbig = $('<span>', {'class': 'big'}).append($displayedName.clone());
|
|
|
|
//var $userbig = $('<span>', {'class': 'big'}).append($displayedName.clone());
|
|
|
|
var $userButton = $('<div>').append($icon);//.append($userbig);
|
|
|
|
var $userButton = $('<div>').append($icon);//.append($userbig);
|
|
|
|
if (account) {
|
|
|
|
if (account) {
|
|
|
|
$userButton = $('<div>');//.append(accountName.slice(0,1).toUpperCase());
|
|
|
|
$userButton = $('<div>').append(accountName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*if (account && config.displayNameCls) {
|
|
|
|
/*if (account && config.displayNameCls) {
|
|
|
|
$userbig.append($('<span>', {'class': 'account-name'}).text('(' + accountName + ')'));
|
|
|
|
$userbig.append($('<span>', {'class': 'account-name'}).text('(' + accountName + ')'));
|
|
|
@ -1674,15 +1674,19 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var $userAdmin = createDropdown(dropdownConfigUser);
|
|
|
|
var $userAdmin = createDropdown(dropdownConfigUser);
|
|
|
|
|
|
|
|
|
|
|
|
if (account) {
|
|
|
|
if (account && !config.static && store) {
|
|
|
|
var $avatar = $userAdmin.find('.buttonTitle');
|
|
|
|
var $avatar = $userAdmin.find('.buttonTitle');
|
|
|
|
var url = store ? store.getProfile().avatar : undefined;
|
|
|
|
var updateButton = function (newName) {
|
|
|
|
|
|
|
|
var url = store.getProfile().avatar;
|
|
|
|
$avatar.html('');
|
|
|
|
$avatar.html('');
|
|
|
|
common.displayAvatar($avatar, url, accountName, function ($img) {
|
|
|
|
common.displayAvatar($avatar, url, newName, function ($img) {
|
|
|
|
if ($img) {
|
|
|
|
if ($img) {
|
|
|
|
$userAdmin.find('button').addClass('avatar');
|
|
|
|
$userAdmin.find('button').addClass('avatar');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
common.onDisplayNameChanged(updateButton);
|
|
|
|
|
|
|
|
updateButton(common.getDisplayName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$userAdmin.find('a.logout').click(function () {
|
|
|
|
$userAdmin.find('a.logout').click(function () {
|
|
|
|