Bug 539066 - port bug 151244 to seamonkey, so return receipts keep working, r=IanN sr=Neil a=blocking-sm2.1a1+ for CLOSED TREE
This commit is contained in:
Родитель
0aa1af7723
Коммит
feba5dbb3a
|
@ -608,3 +608,8 @@
|
|||
<!-- Phishing Bar -->
|
||||
<!ENTITY phishingBarMessage.label "&brandShortName; thinks this message might be an email scam.">
|
||||
<!ENTITY removePhishingBarButton.label "Not a Scam">
|
||||
|
||||
<!-- MDN Bar -->
|
||||
<!ENTITY mdnBarMessage.label "The sender of this message has asked to be notified when you read this message. Do you wish to notify the sender?">
|
||||
<!ENTITY mdnBarIgnoreButton.label "Ignore Request">
|
||||
<!ENTITY mdnBarSendButton.label "Send Receipt">
|
||||
|
|
|
@ -41,9 +41,6 @@ MsgMdnProcessed=The message was processed by the recipient's mail client without
|
|||
MsgMdnDeleted=The message has been deleted. The person you sent it to may or may not have seen it. They might undelete it at a later time and read it.
|
||||
MsgMdnDenied=The recipient of the message does not wish to send a return receipt back to you.
|
||||
MsgMdnFailed=A failure occurred. A proper return receipt could not be generated or sent to you.
|
||||
MsgMdnWishToSend=The sender of this message has asked to be notified when you read this message.\n\nDo you wish to notify the sender?
|
||||
MsgMdnIgnoreRequest=Ignore Request
|
||||
MsgMdnSendReceipt=Send Receipt
|
||||
# LOCALIZATION NOTE : Do not translate the word "%S" below.
|
||||
MsgMdnMsgSentTo=This is a Return Receipt for the mail that you sent to %S.
|
||||
MdnDisplayedReceipt=Return Receipt (displayed)
|
||||
|
|
|
@ -70,6 +70,7 @@ const kNotAPhishMessage = 1;
|
|||
const kMsgNotificationPhishingBar = 1;
|
||||
const kMsgNotificationJunkBar = 2;
|
||||
const kMsgNotificationRemoteImages = 3;
|
||||
const kMsgNotificationMDN = 4;
|
||||
|
||||
const kMsgForwardAsAttachment = 0;
|
||||
const kMsgForwardInline = 2;
|
||||
|
@ -2539,7 +2540,8 @@ var gMessageNotificationBar =
|
|||
0, // for no msgNotificationBar
|
||||
1, // 1 << (kMsgNotificationPhishingBar - 1)
|
||||
2, // 1 << (kMsgNotificationJunkBar - 1)
|
||||
4 // 1 << (kMsgNotificationRemoteImages - 1)
|
||||
4, // 1 << (kMsgNotificationRemoteImages - 1)
|
||||
8 // 1 << (kMsgNotificationMDN - 1)
|
||||
],
|
||||
|
||||
mMsgNotificationBar: document.getElementById('msgNotificationBar'),
|
||||
|
@ -2581,6 +2583,12 @@ var gMessageNotificationBar =
|
|||
this.updateMsgNotificationBar(kMsgNotificationPhishingBar, phishingMsg);
|
||||
},
|
||||
|
||||
setMDNMsg: function(aMdnGenerator, aMsgHeader)
|
||||
{
|
||||
this.mdnGenerator = aMdnGenerator;
|
||||
this.updateMsgNotificationBar(kMsgNotificationMDN, true);
|
||||
},
|
||||
|
||||
clearMsgNotifications: function()
|
||||
{
|
||||
this.mBarStatus = 0;
|
||||
|
@ -2893,24 +2901,28 @@ function HandleMDNResponse(aUrl)
|
|||
return;
|
||||
|
||||
// Everything looks good so far, let's generate the MDN response.
|
||||
var mdnGenerator = Components.classes["@mozilla.org/messenger-mdn/generator;1"].
|
||||
createInstance(Components.interfaces.nsIMsgMdnGenerator);
|
||||
mdnGenerator.process(Components.interfaces.nsIMsgMdnGenerator.eDisplayed,
|
||||
msgWindow,
|
||||
msgFolder,
|
||||
msgHdr.messageKey,
|
||||
mimeHdr,
|
||||
false);
|
||||
var mdnGenerator = Components.classes["@mozilla.org/messenger-mdn/generator;1"]
|
||||
.createInstance(Components.interfaces.nsIMsgMdnGenerator);
|
||||
var askUser = mdnGenerator.process(Components.interfaces.nsIMsgMdnGenerator.eDisplayed,
|
||||
msgWindow,
|
||||
msgFolder,
|
||||
msgHdr.messageKey,
|
||||
mimeHdr,
|
||||
false);
|
||||
if (askUser)
|
||||
gMessageNotificationBar.setMDNMsg(mdnGenerator, msgHdr);
|
||||
}
|
||||
|
||||
// Reset mark msg MDN "Sent" and "Not Needed".
|
||||
msgHdr.flags = (msgFlags &
|
||||
~Components.interfaces.nsMsgMessageFlags.MDNReportNeeded);
|
||||
msgHdr.OrFlags(Components.interfaces.nsMsgMessageFlags.MDNReportSent);
|
||||
function SendMDNResponse()
|
||||
{
|
||||
gMessageNotificationBar.mdnGenerator.userAgreed();
|
||||
gMessageNotificationBar.updateMsgNotificationBar(kMsgNotificationMDN, false);
|
||||
}
|
||||
|
||||
// Commit db changes.
|
||||
var msgdb = msgFolder.msgDatabase;
|
||||
if (msgdb)
|
||||
msgdb.Commit(Components.interfaces.nsMsgDBCommitType.kLargeCommit);
|
||||
function IgnoreMDNResponse()
|
||||
{
|
||||
gMessageNotificationBar.mdnGenerator.userDeclined();
|
||||
gMessageNotificationBar.updateMsgNotificationBar(kMsgNotificationMDN, false);
|
||||
}
|
||||
|
||||
function MsgSearchMessages()
|
||||
|
|
|
@ -2350,6 +2350,18 @@
|
|||
label="&loadRemoteContentButton.label;"
|
||||
oncommand="LoadMsgWithRemoteContent();"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="mdnBar"
|
||||
class="msgNotificationBar"
|
||||
align="center">
|
||||
<image id="mdnBarImage"/>
|
||||
<description flex="1"
|
||||
class="msgNotificationBarText">&mdnBarMessage.label;</description>
|
||||
<button label="&mdnBarIgnoreButton.label;"
|
||||
oncommand="IgnoreMDNResponse();"/>
|
||||
<button label="&mdnBarSendButton.label;"
|
||||
oncommand="SendMDNResponse();"/>
|
||||
</hbox>
|
||||
</deck>
|
||||
|
||||
<statusbar class="chromeclass-status" id="status-bar">
|
||||
|
|
|
@ -454,7 +454,6 @@ toolbar[iconsize="small"] > #button-stop[disabled="true"] {
|
|||
|
||||
.msgNotificationBar {
|
||||
border-bottom: 1px solid #A5A5A5;
|
||||
-moz-appearance: toolbox;
|
||||
background-color: #C7BC8F;
|
||||
color: black;
|
||||
}
|
||||
|
@ -477,6 +476,11 @@ toolbar[iconsize="small"] > #button-stop[disabled="true"] {
|
|||
padding: 3px;
|
||||
}
|
||||
|
||||
#mdnBarImage {
|
||||
list-style-image: url("chrome://global/skin/icons/Question.png");
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#allowRemoteContentForAuthorDesc {
|
||||
-moz-padding-start: 10px;
|
||||
}
|
||||
|
|
|
@ -572,6 +572,11 @@ toolbar[iconsize="small"] > #button-stop[disabled="true"] {
|
|||
padding: 3px;
|
||||
}
|
||||
|
||||
#mdnBarImage {
|
||||
list-style-image: url("chrome://global/skin/icons/Question.png");
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#allowRemoteContentForAuthorDesc {
|
||||
-moz-padding-start: 10px;
|
||||
}
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.0 KiB |
|
@ -377,6 +377,11 @@ toolbar[iconsize="small"] #button-stop[disabled="true"] {
|
|||
padding: 3px;
|
||||
}
|
||||
|
||||
#mdnBarImage {
|
||||
list-style-image: url("chrome://global/skin/icons/Question.png");
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#allowRemoteContentForAuthorDesc {
|
||||
-moz-padding-start: 10px;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче