gecko-dev/mailnews/base/resources/content/mailEditorOverlay.xul

58 lines
2.1 KiB
XML

<?xml version="1.0"?>
<!-- retrieve generic commands -->
<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/mailEditorOverlay.dtd" >
<overlay id="mailEditorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript">
<![CDATA[
function openComposeWindow(pageUrl, pageTitle)
{
var params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams);
if (params)
{
params.composeFields = Components.classes['@mozilla.org/messengercompose/composefields;1'].createInstance(Components.interfaces.nsIMsgCompFields);
if (params.composeFields)
{
params.composeFields.body = pageUrl;
params.composeFields.subject = pageTitle;
var attachmentData = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);
if (attachmentData)
{
attachmentData.url = pageUrl;
params.composeFields.addAttachment(attachmentData);
}
params.bodyIsLink = true;
var composeService = Components.classes["@mozilla.org/messengercompose;1"].getService(Components.interfaces.nsIMsgComposeService);
if (composeService)
composeService.OpenComposeWindowWithParams(null, params);
}
}
}
]]>
</script>
<!-- editor specific UI items -->
<menupopup id="menu_NewPopup">
<!-- Command nodes and implemention are in mailOverlay.xul -->
<menuitem id="menu_newMessage" position="2"/>
<menuitem id="menu_newCard" position="3"/>
</menupopup>
<menupopup id="menu_FilePopup">
<!-- The command node cmd_editSendPage is in editorOverlay.xul.
Implementation is in ComposerCommands.js
-->
<menuitem id="menu_sendPage" label="&sendPage.label;" accesskey="&sendPage.accesskey;" observes="cmd_editSendPage" insertafter="previewInBrowser"/>
</menupopup>
</overlay>