First part of Bug 243631 Availability to show the name out of the addressbook for a display name - use AB display name when displaying message headers. r=me

This commit is contained in:
Boying Lu 2008-08-18 11:48:38 +01:00
Родитель 06e761c152
Коммит f4996d48ce
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -939,18 +939,22 @@ function updateEmailAddressNode(emailAddressNode, address)
function AddExtraAddressProcessing(emailAddress, addressNode)
{
var displayName = addressNode.getAttribute("displayName");
if (gShowCondensedEmailAddresses && displayName)
if (gShowCondensedEmailAddresses)
{
// always show the address for the from and reply-to fields
var parentElementId = addressNode.parentNode.id;
var condenseName = true;
var card = useDisplayNameForAddress(emailAddress);
var displayName = null;
if (card)
displayName = card.displayName;
if (parentElementId == "expandedfromBox" || parentElementId == "expandedreply-toBox")
condenseName = false;
if (condenseName && useDisplayNameForAddress(emailAddress))
if (condenseName && displayName)
{
addressNode.setAttribute("label", displayName);
addressNode.setAttribute("tooltiptext", emailAddress);