Added delete button code

git-svn-id: svn://10.0.0.236/trunk@23724 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
putterman%netscape.com 1999-03-11 19:52:02 +00:00
parent 8df736e3ad
commit ca9ee9973a
3 changed files with 20 additions and 4 deletions

View File

@ -322,7 +322,7 @@
<titledbutton src="resource:/res/toolbar/Mail_Forward.gif" align="bottom" value="Forward" onclick="MsgForwardMessage()">
</titledbutton>
<titledbutton src="resource:/res/samples/delmsg.gif" align="bottom" value="Delete" onclick="MsgLoadNewsMessage('')">
<titledbutton src="resource:/res/samples/delmsg.gif" align="bottom" value="Delete" onclick="MsgDeleteMessage()">
</titledbutton>
@ -339,7 +339,7 @@
</html:div>
<html:div id="thread">
<html:iframe align=right src="threadPane.xul" name="browser.foo" width="650" height="370" > </html:iframe>
<html:iframe align=right src="threadPane.xul" id="threadPane" width="650" height="370" > </html:iframe>
</html:div>
<html:div id="message">

View File

@ -9,7 +9,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree rdf:datasources="rdf:mailnews">
<tree rdf:datasources="rdf:mailnews" id="threadTree">
<treecol rdf:resource="http://home.netscape.com/NC-rdf#Subject"/>
<treecol rdf:resource="http://home.netscape.com/NC-rdf#Sender"/>
<treecol rdf:resource="http://home.netscape.com/NC-rdf#Date"/>

View File

@ -40,6 +40,23 @@ function MsgNewMessage()
NewMessage();
}
function MsgDeleteMessage()
{
dump("\nMsgDeleteMessage from XUL\n");
var tree = frames[0].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 MsgDeleteMessage\n")
var NodeList = tree.getElementsByAttribute("selected", "true");
appCore.DeleteMessage(tree, NodeList);
}
}
function MsgNewFolder() {}
function MsgOpenAttachment() {}
function MsgSaveAsFile() {}
@ -61,7 +78,6 @@ function MsgEditRedo() {}
function MsgEditCut() {}
function MsgEditCopy() {}
function MsgEditPaste() {}
function MsgDeleteMessage() {}
function MsgSelectAll() {}
function MsgSelectThread() {}
function MsgSelectFlaggedMsg() {}