more reply/forward message support
git-svn-id: svn://10.0.0.236/trunk@24139 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -49,22 +49,28 @@ function ChangeFolder(folderNode)
|
||||
}
|
||||
|
||||
|
||||
function ReplyMessage(tree, nodeList, msgAppCore)
|
||||
function ReplyMessage(tree, nodeList, msgAppCore, type)
|
||||
{
|
||||
var appCore = new ComposeAppCore();
|
||||
if (appCore != null) {
|
||||
dump("Initializing ComposeAppCore and creating a new Message\n");
|
||||
appCore.Init("ComposeAppCore");
|
||||
appCore.ReplyMessage("resource:/res/samples/compose.xul", tree, nodeList, msgAppCore, 0);
|
||||
}
|
||||
if (msgAppCore != null) {
|
||||
var appCore = new ComposeAppCore();
|
||||
if (appCore != null) {
|
||||
dump("Initializing ComposeAppCore and creating a new Message\n");
|
||||
appCore.Init("ComposeAppCore");
|
||||
appCore.ReplyMessage("resource:/res/samples/compose.xul", tree,
|
||||
nodeList, msgAppCore, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ForwardMessage(tree, nodeList, msgAppCore)
|
||||
function ForwardMessage(tree, nodeList, msgAppCore, type)
|
||||
{
|
||||
var appCore = new ComposeAppCore();
|
||||
if (appCore != null) {
|
||||
dump("Initializing ComposeAppCore and creating a new Message\n");
|
||||
appCore.Init("ComposeAppCore");
|
||||
appCore.ForwardMessage("resource:/res/samples/compose.xul", tree, nodeList, msgAppCore, 0);
|
||||
}
|
||||
if (msgAppCore != null) {
|
||||
var appCore = new ComposeAppCore();
|
||||
if (appCore != null) {
|
||||
dump("Initializing ComposeAppCore and creating a new Message\n");
|
||||
appCore.Init("ComposeAppCore");
|
||||
appCore.ForwardMessage("resource:/res/samples/compose.xul", tree,
|
||||
nodeList, msgAppCore, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,45 +61,82 @@ function MsgDeleteMessage()
|
||||
}
|
||||
}
|
||||
|
||||
function MsgReplyMessage()
|
||||
function ReplyMessageHelper(type)
|
||||
{
|
||||
dump("\nMsgReplyMessage from XUL\n");
|
||||
var tree = frames[0].frames[1].document.getElementById('threadTree');
|
||||
if(tree)
|
||||
dump("tree is valid\n")
|
||||
var appCore = new MsgAppCore();
|
||||
if (appCore != null) {
|
||||
appCore.Init("MsgAppCore");
|
||||
appCore.SetWindow(window);
|
||||
dump("\nAppcore isn't null in MsgReplyMessage\n");
|
||||
var nodeList = tree.getElementsByAttribute("selected", "true");
|
||||
// var messageHdr = appCore.GetMessageHeader(tree, NodeList);
|
||||
ReplyMessage(tree, nodeList, appCore);
|
||||
}
|
||||
dump("\nMsgReplyMessage from XUL\n");
|
||||
var tree = frames[0].frames[1].document.getElementById('threadTree');
|
||||
if(tree) {
|
||||
dump("tree is valid\n");
|
||||
var nodeList = tree.getElementsByAttribute("selected", "true");
|
||||
var msgAppCore = XPAppCoresManager.Find("MsgAppCore");
|
||||
if (msgAppCore == null) {
|
||||
dump("ReplyMessageHelper: Creating msgAppCore\n");
|
||||
msgAppCore = new MsgAppCore();
|
||||
msgAppCore.Init("MsgAppCore");
|
||||
msgAppCore.SetWindow(window);
|
||||
}
|
||||
dump("msgAppCore probably found\n");
|
||||
dump("Reply message type ");
|
||||
dump(type);
|
||||
dump("\n");
|
||||
if (msgAppCore && nodeList)
|
||||
ReplyMessage(tree, nodeList, msgAppCore, type);
|
||||
}
|
||||
}
|
||||
|
||||
function ForwardMessageHelper(type)
|
||||
{
|
||||
dump("\nMsgForwardMessage from XUL\n");
|
||||
var tree = frames[0].frames[1].document.getElementById('threadTree');
|
||||
if(tree) {
|
||||
dump("tree is valid\n");
|
||||
var nodeList = tree.getElementsByAttribute("selected", "true");
|
||||
var msgAppCore = XPAppCoresManager.Find("MsgAppCore");
|
||||
if (msgAppCore == null) {
|
||||
dump("ForwardMessageHelper: Creating msgAppCore\n");
|
||||
msgAppCore = new MsgAppCore();
|
||||
msgAppCore.Init("MsgAppCore");
|
||||
msgAppCore.SetWindow(window);
|
||||
}
|
||||
dump("msgAppCore probably found\n");
|
||||
dump("Forward message type ");
|
||||
dump(type);
|
||||
dump("\n");
|
||||
if (msgAppCore && nodeList)
|
||||
ForwardMessage(tree, nodeList, msgAppCore, type);
|
||||
}
|
||||
}
|
||||
|
||||
function MsgReplyMessage()
|
||||
{
|
||||
ReplyMessageHelper(0);
|
||||
}
|
||||
|
||||
function MsgReplyToAllMessage()
|
||||
{
|
||||
ReplyMessageHelper(1);
|
||||
}
|
||||
|
||||
function MsgForwardMessage()
|
||||
{
|
||||
dump("\nMsgForwardMessage from XUL\n");
|
||||
var tree = frames[0].frames[1].document.getElementById('threadTree');
|
||||
if(tree)
|
||||
dump("tree is valid\n")
|
||||
var appCore = new MsgAppCore();
|
||||
if (appCore != null) {
|
||||
appCore.Init("MsgAppCore");
|
||||
appCore.SetWindow(window);
|
||||
dump("\nAppcore isn't null in MsgForwardMessage\n");
|
||||
var nodeList = tree.getElementsByAttribute("selected", "true");
|
||||
// var messageHdr = appCore.GetMessageHeader(tree, NodeList);
|
||||
ForwardMessage(tree, nodeList, appCore);
|
||||
}
|
||||
}
|
||||
ForwardMessageHelper(0);
|
||||
}
|
||||
|
||||
function MsgForwardAsInline()
|
||||
{
|
||||
ForwardMessageHelper(1);
|
||||
}
|
||||
|
||||
function MsgForwardAsQuoted()
|
||||
{
|
||||
ForwardMessageHelper(2);
|
||||
}
|
||||
|
||||
function MsgForwardAsAttachment()
|
||||
{
|
||||
ForwardMessageHelper(0);
|
||||
}
|
||||
|
||||
function MsgReplyToAllMessage() {}
|
||||
function MsgForwardAsInline() {}
|
||||
function MsgForwardAsQuoted() {}
|
||||
function MsgForwardAsAttachment() {}
|
||||
function MsgNewFolder() {}
|
||||
function MsgOpenAttachment() {}
|
||||
function MsgSaveAsFile() {}
|
||||
|
||||
Reference in New Issue
Block a user