mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
fix 285474 display sender header if it's different than from header, sr=mscott, a=chofmann
This commit is contained in:
parent
ef2a42837d
commit
aae9e6abd8
@ -127,6 +127,7 @@ var gCollapsedHeaderList = [ {name:"subject", outputFunction:updateHeaderValueIn
|
||||
// We also have an expanded header view. This shows many of your more common (and useful) headers.
|
||||
var gExpandedHeaderList = [ {name:"subject"},
|
||||
{name:"from", outputFunction:OutputEmailAddresses},
|
||||
{name:"sender", outputFunction:OutputEmailAddresses},
|
||||
{name:"reply-to", outputFunction:OutputEmailAddresses},
|
||||
{name:"date"},
|
||||
{name:"to", useToggle:true, outputFunction:OutputEmailAddresses},
|
||||
@ -358,7 +359,9 @@ var messageHeaderSink = {
|
||||
processHeaders: function(headerNameEnumerator, headerValueEnumerator, dontCollectAddress)
|
||||
{
|
||||
this.onStartHeaders();
|
||||
var fromMailbox;
|
||||
|
||||
var index = 0;
|
||||
while (headerNameEnumerator.hasMore())
|
||||
{
|
||||
var header = new Object;
|
||||
@ -374,6 +377,11 @@ var messageHeaderSink = {
|
||||
if (lowerCaseHeaderName == "x-mailer" || lowerCaseHeaderName == "x-mimeole")
|
||||
lowerCaseHeaderName = "user-agent";
|
||||
|
||||
if (lowerCaseHeaderName == "sender")
|
||||
{
|
||||
if (fromMailbox == header.headerValue)
|
||||
continue;
|
||||
}
|
||||
// according to RFC 2822, certain headers
|
||||
// can occur "unlimited" times
|
||||
if (lowerCaseHeaderName in currentHeaderData)
|
||||
@ -393,6 +401,9 @@ var messageHeaderSink = {
|
||||
|
||||
if (lowerCaseHeaderName == "from")
|
||||
{
|
||||
if (msgHeaderParser && header.value)
|
||||
fromMailbox = msgHeaderParser.extractHeaderAddressMailboxes(null, header.value);
|
||||
|
||||
if (header.value) {
|
||||
if ((gCollectIncoming && !dontCollectAddress) ||
|
||||
(gCollectNewsgroup && dontCollectAddress))
|
||||
@ -687,9 +698,9 @@ function createNewHeaderView(headerName)
|
||||
}
|
||||
else
|
||||
{
|
||||
newHeader.setAttribute('label', currentHeaderData[headerName].headerName + ':');
|
||||
// all mail-headerfield elements are keyword related
|
||||
newHeader.setAttribute('keywordrelated','true');
|
||||
newHeader.setAttribute('label', currentHeaderData[headerName].headerName + ':');
|
||||
// all mail-headerfield elements are keyword related
|
||||
newHeader.setAttribute('keywordrelated','true');
|
||||
}
|
||||
|
||||
newHeader.collapsed = true;
|
||||
@ -740,7 +751,7 @@ function UpdateMessageHeaders()
|
||||
else if (!gCollapsedHeaderViewMode && !gBuiltExpandedView)
|
||||
{
|
||||
if (headerName in gExpandedHeaderView)
|
||||
headerEntry = gExpandedHeaderView[headerName];
|
||||
headerEntry = gExpandedHeaderView[headerName];
|
||||
|
||||
if (!headerEntry && gViewAllHeaders)
|
||||
{
|
||||
@ -883,6 +894,7 @@ function OutputEmailAddresses(headerEntry, emailAddresses)
|
||||
} // if msgheader parser
|
||||
}
|
||||
|
||||
|
||||
function setFromBuddyIcon(email)
|
||||
{
|
||||
var fromBuddyIcon = document.getElementById("fromBuddyIcon");
|
||||
|
@ -146,6 +146,7 @@
|
||||
<mail-toggle-headerfield keywordrelated="true" id="expandedsubjectBox" class="subjectvalue" label="&subjectField.label;" ontwistyclick="ToggleHeaderView();" collapsed="true"/>
|
||||
|
||||
<mail-emailheaderfield id="expandedfromBox" label="&fromField.label;" collapsed="true"/>
|
||||
<mail-emailheaderfield id="expandedsenderBox" label="&senderField.label;" collapsed="true"/>
|
||||
<mail-headerfield id="expandedorganizationBox" label="&organizationField.label;" collapsed="true"/>
|
||||
<mail-emailheaderfield id="expandedreply-toBox" label="&replyToField.label;" collapsed="true"/>
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
<!ENTITY toField.label "To: ">
|
||||
<!ENTITY fromField.label "From: ">
|
||||
<!ENTITY senderField.label "Sender: ">
|
||||
<!ENTITY organizationField.label "Organization: ">
|
||||
<!ENTITY replyToField.label "Reply-To: ">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user