зеркало из https://github.com/mozilla/pjs.git
Fix for 10881. Context menus in the message pane.
This commit is contained in:
Родитель
c8df10b44a
Коммит
d7278159c9
|
@ -47,17 +47,19 @@ Rights Reserved.
|
|||
windowtype="mail:3pane">
|
||||
|
||||
|
||||
<html:script src="chrome://global/content/strres.js"/>
|
||||
<html:script src="chrome://messenger/content/widgetglue.js"/>
|
||||
<html:script src="chrome://messenger/content/commandglue.js"/>
|
||||
<html:script src="chrome://messenger/content/shareglue.js"/>
|
||||
<html:script src="chrome://messenger/content/msgViewNavigation.js"/>
|
||||
<html:script src="chrome://messenger/content/mailWindow.js"/>
|
||||
<html:script src="chrome://messenger/content/msgMail3PaneWindow.js"/>
|
||||
<html:script src="chrome://messenger/content/mail3PaneWindowCommands.js"/>
|
||||
<html:script src="chrome://messenger/content/mailContextMenus.js"/>
|
||||
<html:script src="chrome://messenger/content/messengerdnd.js"/>
|
||||
<html:script src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
<script src="chrome://messenger/content/widgetglue.js"/>
|
||||
<script src="chrome://messenger/content/commandglue.js"/>
|
||||
<script src="chrome://messenger/content/shareglue.js"/>
|
||||
<script src="chrome://messenger/content/msgViewNavigation.js"/>
|
||||
<script src="chrome://messenger/content/mailWindow.js"/>
|
||||
<script src="chrome://messenger/content/msgMail3PaneWindow.js"/>
|
||||
<script src="chrome://messenger/content/mail3PaneWindowCommands.js"/>
|
||||
<script src="chrome://messenger/content/mailContextMenus.js"/>
|
||||
<script src="chrome://messenger/content/messengerdnd.js"/>
|
||||
<script src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script src="chrome://navigator/content/nsContextMenu.js"/>
|
||||
<script src="chrome://navigator/content/navigator.js"/>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_Mail"
|
||||
|
@ -283,6 +285,7 @@ Rights Reserved.
|
|||
<menuitem value="&SendMailTo.label;"
|
||||
oncommand="SendMailToNode(document.popupNode)"/>
|
||||
</popup>
|
||||
<popup id="messagePaneContext"/>
|
||||
</popupset>
|
||||
|
||||
|
||||
|
@ -312,7 +315,7 @@ Rights Reserved.
|
|||
<toolbox id="msgHeaderView"/>
|
||||
|
||||
<!-- message view -->
|
||||
<html:iframe id="messagepane" style="height: 0px" flex="1" name="messagepane" type="content" src="about:blank"/>
|
||||
<iframe id="messagepane" context="messagePaneContext" style="height: 0px" flex="1" name="messagepane" type="content-primary" src="about:blank"/>
|
||||
</box>
|
||||
<box id="status-bar">
|
||||
<box align="vertical" style="width:100px">
|
||||
|
@ -321,11 +324,11 @@ Rights Reserved.
|
|||
<spring flex="100%"/>
|
||||
</box>
|
||||
|
||||
<titledbutton id="statusText" class="status-bar" align="left" flex="100%" value="&statusText.label;"/>
|
||||
<titledbutton value="&unreadCountText.label;"/>
|
||||
<titledbutton id="unreadMessageCount" style="min-width: 5px"/>
|
||||
<titledbutton value="&totalCountText.label;"/>
|
||||
<titledbutton id="totalMessageCount" style="min-width: 5px"/>
|
||||
<text id="statusText" class="status-bar" align="left" flex="100%" value="&statusText.label;"/>
|
||||
<text value="&unreadCountText.label;"/>
|
||||
<text id="unreadMessageCount" style="min-width: 5px"/>
|
||||
<text value="&totalCountText.label;"/>
|
||||
<text id="totalMessageCount" style="min-width: 5px"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
|
|
@ -22,55 +22,142 @@
|
|||
|
||||
function fillThreadPaneContextMenu()
|
||||
{
|
||||
var tree = GetThreadTree();
|
||||
var selectedItems = tree.selectedItems;
|
||||
var numSelected = selectedItems.length;
|
||||
var selectedMessages = GetSelectedMessages();
|
||||
var numSelected = selectedMessages ? selectedMessages.length : 0;
|
||||
|
||||
ShowMenuItem("threadPaneContext-openNewWindow", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-openNewWindow", false);
|
||||
var isNewsgroup = false;
|
||||
var selectedMessage = null;
|
||||
if(numSelected == 1)
|
||||
{
|
||||
selectedMessage = selectedMessages[0];
|
||||
isNewsgroup = GetMessageType(selectedMessage) == "news";
|
||||
}
|
||||
|
||||
|
||||
SetupNewMessageWindowMenuItem("threadPaneContext-openNewWindow", numSelected, false);
|
||||
SetupEditAsNewMenuItem("threadPaneContext-editAsNew", numSelected, false);
|
||||
|
||||
ShowMenuItem("threadPaneContext-editAsNew", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-editAsNew", false);
|
||||
|
||||
ShowMenuItem("threadPaneContext-sep-open", (numSelected <= 1));
|
||||
|
||||
ShowMenuItem("threadPaneContext-replySender", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-replySender", (numSelected == 1));
|
||||
|
||||
ShowMenuItem("threadPaneContext-replyAll", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-replyAll", (numSelected == 1));
|
||||
|
||||
ShowMenuItem("threadPaneContext-forward", true);
|
||||
EnableMenuItem("threadPaneContext-forward", (numSelected > 0));
|
||||
SetupReplyToSenderMenuItem("threadPaneContext-replySender", numSelected, false);
|
||||
SetupReplyToNewsgroupMenuItem("threadPaneContext-replyNewsgroup", numSelected, isNewsgroup, false);
|
||||
SetupReplyAllMenuItem("threadPaneContext-replyAll", numSelected, false);
|
||||
SetupForwardMenuItem("threadPaneContext-forward", numSelected, false);
|
||||
|
||||
ShowMenuItem("threadPaneContext-sep-reply", true);
|
||||
|
||||
ShowMenuItem("threadPaneContext-moveMenu", true);
|
||||
EnableMenuItem("threadPaneContext-moveMenu", (numSelected > 0));
|
||||
SetupMoveMenuItem("threadPaneContext-moveMenu", numSelected, isNewsgroup, false);
|
||||
SetupCopyMenuItem("threadPaneContext-copyMenu", numSelected, false);
|
||||
SetupSaveAsMenuItem("threadPaneContext-saveAs", numSelected, false);
|
||||
SetupPrintMenuItem("threadPaneContext-print", numSelected, false);
|
||||
SetupDeleteMenuItem("threadPaneContext-delete", numSelected, false);
|
||||
SetupAddSenderToABMenuItem("threadPaneContext-addSenderToAddressBook", numSelected, false);
|
||||
SetupAddAllToABMenuItem("threadPaneContext-addAllToAddressBook", numSelected, false);
|
||||
|
||||
ShowMenuItem("threadPaneContext-copyMenu", true);
|
||||
EnableMenuItem("threadPaneContext-copyMenu", (numSelected > 0));
|
||||
|
||||
ShowMenuItem("threadPaneContext-saveAs", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-saveAs", (numSelected == 1));
|
||||
|
||||
ShowMenuItem("threadPaneContext-print", true);
|
||||
EnableMenuItem("threadPaneContext-print", (numSelected > 0));
|
||||
|
||||
ShowMenuItem("threadPaneContext-delete", true);
|
||||
EnableMenuItem("threadPaneContext-delete", (numSelected > 0));
|
||||
|
||||
ShowMenuItem("threadPaneContext-sep-edit", (numSelected <= 1));
|
||||
|
||||
ShowMenuItem("threadPaneContext-addSenderToAddressBook", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-addSenderToAddressBook", false);
|
||||
|
||||
ShowMenuItem("threadPaneContext-addAllToAddressBook", (numSelected <= 1));
|
||||
EnableMenuItem("threadPaneContext-addAllToAddressBook", false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
function GetMessageType(message)
|
||||
{
|
||||
var compositeDataSource = GetCompositeDataSource("MessageProperty");
|
||||
var messageResource = message.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
if(messageResource && compositeDataSource)
|
||||
{
|
||||
var property =
|
||||
RDF.GetResource('http://home.netscape.com/NC-rdf#MessageType');
|
||||
if (!property) return null;
|
||||
var result = compositeDataSource.GetTarget(messageResource, property , true);
|
||||
if (!result) return null;
|
||||
result = result.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
if (!result) return null;
|
||||
return result.Value;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
function SetupNewMessageWindowMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
|
||||
EnableMenuItem(menuID, true);
|
||||
}
|
||||
|
||||
function SetupEditAsNewMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1)&& !forceHide);
|
||||
EnableMenuItem(menuID, true);
|
||||
}
|
||||
|
||||
function SetupReplyToSenderMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1)&& !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected == 1));
|
||||
}
|
||||
|
||||
function SetupReplyToNewsgroupMenuItem(menuID, numSelected, isNewsgroup, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && isNewsgroup && !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected == 1));
|
||||
}
|
||||
|
||||
function SetupReplyAllMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected == 1));
|
||||
}
|
||||
|
||||
function SetupForwardMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected > 0));
|
||||
}
|
||||
|
||||
function SetupMoveMenuItem(menuID, numSelected, isNewsgroup, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, !isNewsgroup && !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected > 0));
|
||||
}
|
||||
|
||||
function SetupCopyMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected > 0));
|
||||
}
|
||||
|
||||
function SetupSaveAsMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected == 1));
|
||||
}
|
||||
|
||||
function SetupPrintMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected > 0));
|
||||
}
|
||||
|
||||
function SetupDeleteMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, !forceHide);
|
||||
EnableMenuItem(menuID, (numSelected > 0));
|
||||
}
|
||||
|
||||
function SetupAddSenderToABMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
|
||||
EnableMenuItem(menuID, false);
|
||||
}
|
||||
|
||||
function SetupAddAllToABMenuItem(menuID, numSelected, forceHide)
|
||||
{
|
||||
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
|
||||
EnableMenuItem(menuID, false);
|
||||
}
|
||||
|
||||
function fillFolderPaneContextMenu()
|
||||
{
|
||||
var tree = GetFolderTree();
|
||||
|
@ -255,4 +342,115 @@ function SetMenuItemValue(id, value)
|
|||
if(item)
|
||||
item.setAttribute('value', value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function fillMessagePaneContextMenu(contextMenuNode)
|
||||
{
|
||||
contextMenu = new nsContextMenu(contextMenuNode);
|
||||
|
||||
var message = GetLoadedMessage();
|
||||
var numSelected = (message) ? 1 : 0;
|
||||
|
||||
var isNewsgroup = false;
|
||||
|
||||
if(numSelected == 1)
|
||||
isNewsgroup = GetMessageType(message) == "news";
|
||||
|
||||
|
||||
SetupNewMessageWindowMenuItem("messagePaneContext-openNewWindow", numSelected, (numSelected == 0));
|
||||
SetupEditAsNewMenuItem("messagePaneContext-editAsNew", numSelected, (numSelected == 0));
|
||||
SetupReplyToSenderMenuItem("messagePaneContext-replySender", numSelected, (numSelected == 0));
|
||||
SetupReplyToNewsgroupMenuItem("messagePaneContext-replyNewsgroup", numSelected, isNewsgroup, (numSelected == 0));
|
||||
SetupReplyAllMenuItem("messagePaneContext-replyAll" , numSelected, (numSelected == 0));
|
||||
SetupForwardMenuItem("messagePaneContext-forward", numSelected, (numSelected == 0));
|
||||
SetupMoveMenuItem("messagePaneContext-moveMenu", numSelected, isNewsgroup, (numSelected == 0));"context-copy"
|
||||
SetupCopyMenuItem("messagePaneContext-copyMenu", numSelected, (numSelected == 0));
|
||||
SetupSaveAsMenuItem("messagePaneContext-saveAs", numSelected, (numSelected == 0));
|
||||
SetupPrintMenuItem("messagePaneContext-print", numSelected, (numSelected == 0));
|
||||
SetupDeleteMenuItem("messagePaneContext-delete", numSelected, (numSelected == 0));
|
||||
SetupAddSenderToABMenuItem("messagePaneContext-addSenderToAddressBook", numSelected, (numSelected == 0));
|
||||
SetupAddAllToABMenuItem("messagePaneContext-addAllToAddressBook", numSelected, (numSelected == 0));
|
||||
|
||||
//Figure out separators
|
||||
ShowMenuItem("messagePaneContext-sep-open", ShowMessagePaneOpenSeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-reply", ShowMessagePaneReplySeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-edit", ShowMessagePaneEditSeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-addressBook", ShowMessagePaneABSeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-link", ShowMessagePaneLinkSeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-image", ShowMessagePaneImageSeparator());
|
||||
ShowMenuItem("messagePaneContext-sep-copy", ShowMessagePaneCopySeparator());
|
||||
}
|
||||
|
||||
|
||||
function ShowMessagePaneOpenSeparator()
|
||||
{
|
||||
return(IsMenuItemShowing("messagePaneContext-openNewWindow") ||
|
||||
IsMenuItemShowingWithStyle("context-selectall") ||
|
||||
IsMenuItemShowingWithStyle("context-copy"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneReplySeparator()
|
||||
{
|
||||
return (IsMenuItemShowing("messagePaneContext-replySender") ||
|
||||
IsMenuItemShowing("messagePaneContext-replyNewsgroup") ||
|
||||
IsMenuItemShowing("messagePaneContext-replyAll") ||
|
||||
IsMenuItemShowing("messagePaneContext-forward") ||
|
||||
IsMenuItemShowing("messagePaneContext-editAsNew"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneEditSeparator()
|
||||
{
|
||||
return (IsMenuItemShowing("messagePaneContext-moveMenu") ||
|
||||
IsMenuItemShowing("messagePaneContext-copyMenu") ||
|
||||
IsMenuItemShowing("messagePaneContext-saveAs") ||
|
||||
IsMenuItemShowing("messagePaneContext-print") ||
|
||||
IsMenuItemShowing("messagePaneContext-delete"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneABSeparator()
|
||||
{
|
||||
return (IsMenuItemShowing("messagePaneContext-addSenderToAddressBook") ||
|
||||
IsMenuItemShowing("messagePaneContext-addAllToAddressBook"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneLinkSeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-openlink") ||
|
||||
IsMenuItemShowingWithStyle("context-editlink"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneImageSeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-viewimage"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneCopySeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-copylink") ||
|
||||
IsMenuItemShowingWithStyle("context-copyimage"));
|
||||
}
|
||||
|
||||
function IsMenuItemShowing(menuID)
|
||||
{
|
||||
|
||||
var item = document.getElementById(menuID);
|
||||
if(item)
|
||||
{
|
||||
return(item.getAttribute('hidden') !='true');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function IsMenuItemShowingWithStyle(menuID)
|
||||
{
|
||||
var item = document.getElementById(menuID);
|
||||
if(item)
|
||||
{
|
||||
var style = item.getAttribute( "style" );
|
||||
return ( style.indexOf( "display:none;" ) == -1 )
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,12 @@ Communications Corporation. Portions created by Netscape are
|
|||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/messenger.dtd">
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
|
||||
%messengerDTD;
|
||||
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
|
||||
%navigatorDTD;
|
||||
]>
|
||||
<overlay
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
|
@ -83,7 +87,6 @@ Rights Reserved.
|
|||
<broadcaster id="cmd_viewAllMsgs" oncommand="goDoCommand('cmd_viewAllMsgs')" disabled="true"/>
|
||||
<broadcaster id="cmd_viewUnreadMsgs" oncommand="goDoCommand('cmd_viewUnreadMsgs')" disabled="true"/>
|
||||
<broadcaster id="cmd_sortByThread" oncommand="goDoCommand('cmd_sortByThread')" disabled="true"/>
|
||||
|
||||
</broadcasterset>
|
||||
|
||||
<keyset id="keyset">
|
||||
|
@ -110,6 +113,201 @@ Rights Reserved.
|
|||
<key id="key_previousUnreadMsg" key="&previousUnreadMsgCmd.key;" control="false" shift="false" observes="cmd_previousUnreadMsg"/>
|
||||
</keyset>
|
||||
|
||||
<popup id="messagePaneContext"
|
||||
oncreate="return fillMessagePaneContextMenu(this);"
|
||||
ondestroy="contextMenu.onDestroy(); contextMenu = null;">
|
||||
<menuitem id="messagePaneContext-openNewWindow"
|
||||
value="&contextOpenNewWindow.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgOpenNewWindowForMessage();"/>
|
||||
<menuitem id="context-selectall"
|
||||
value="&selectAllCmd.label;"
|
||||
accesskey="&selectAllCmd.accesskey;"
|
||||
observes="cmd_selectAll"/>
|
||||
<menuitem id="context-copy"
|
||||
value="©Cmd.label;"
|
||||
accesskey="©Cmd.accesskey;"
|
||||
observes="cmd_copy"/>
|
||||
<menuseparator id="messagePaneContext-sep-open"/>
|
||||
<menuitem id="messagePaneContext-replySender"
|
||||
value="&contextReplySender.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgReplyMessage(event);"/>
|
||||
<menuitem id="messagePaneContext-replyNewsgroup"
|
||||
value="&contextReplyNewsgroup.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgReplyMessage(event);"/>
|
||||
<menuitem id="messagePaneContext-replyAll"
|
||||
value="&contextReplyAll.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgReplyToAllMessage(event);"/>
|
||||
<menuitem id="messagePaneContext-forward"
|
||||
value="&contextForward.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgForwardMessage(event);"/>
|
||||
<menuitem id="messagePaneContext-editAsNew"
|
||||
value="&contextEditAsNew.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgEditMessageAsNew();"/>
|
||||
<menuseparator id="messagePaneContext-sep-reply"/>
|
||||
<menu id="messagePaneContext-moveMenu"
|
||||
value="&contextMoveMsgMenu.label;"
|
||||
datasources="rdf:null"
|
||||
rdf:ignore="http://home.netscape.com/NC-rdf#MessageChild">
|
||||
<menupopup/>
|
||||
<template>
|
||||
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem uri="..." value="&fileHereMenu.label;"
|
||||
oncommand="MsgMoveMessage(event.target)"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType" />
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="false" nc:ServerType="nntp">
|
||||
<!-- don't show nntp servers in the file and copies menus -->
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
|
||||
<!-- note, there is no "file here" -->
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup/>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgMoveMessage(event.target)"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menu>
|
||||
<menu id="messagePaneContext-copyMenu"
|
||||
value="&contextCopyMsgMenu.label;"
|
||||
datasources="rdf:null"
|
||||
rdf:ignore="http://home.netscape.com/NC-rdf#MessageChild">
|
||||
<menupopup/>
|
||||
<template>
|
||||
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem uri="..." value="&fileHereMenu.label;"
|
||||
oncommand="MsgCopyMessage(event.target)"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="false" nc:ServerType="nntp">
|
||||
<!-- don't show nntp servers in the file and copies menus -->
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
|
||||
<!-- note, there is no "file here" -->
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup/>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target)"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
|
||||
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menu>
|
||||
<menuitem id="messagePaneContext-saveAs"
|
||||
value="&contextSaveAs.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgSaveAsFile();"/>
|
||||
<menuitem id="messagePaneContext-print"
|
||||
value="&contextPrint.label;"
|
||||
accesskey=""
|
||||
oncommand="PrintEnginePrint();"/>
|
||||
<menuitem id="messagePaneContext-delete"
|
||||
value="&contextDelete.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgDeleteMessage(false, false);"/>
|
||||
<menuseparator id="messagePaneContext-sep-edit"/>
|
||||
<menuitem id="messagePaneContext-addSenderToAddressBook"
|
||||
value="&contextAddSenderToAddressBook.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgAddSenderToAddressBook();"/>
|
||||
<menuitem id="messagePaneContext-addAllToAddressBook"
|
||||
value="&contextAddAllToAddressBook.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgAddAllToAddressBook();"/>
|
||||
<menuseparator id="messagePaneContext-sep-addressBook"/>
|
||||
<menuitem id="context-openlink"
|
||||
value="&openLinkCmd.label;"
|
||||
accesskey=""
|
||||
oncommand="contextMenu.openLink();"/>
|
||||
<menuitem id="context-editlink"
|
||||
value="&editLinkCmd.label;"
|
||||
accesskey=""
|
||||
oncommand="contextMenu.editLink();"/>
|
||||
<menuseparator id="messagePaneContext-sep-link"/>
|
||||
<menuitem id="context-viewimage"
|
||||
value="&viewImageCmd.label;"
|
||||
accesskey=""
|
||||
oncommand="contextMenu.viewImage();"/>
|
||||
<menuseparator id="messagePaneContext-sep-image"/>
|
||||
<menuitem id="context-copylink"
|
||||
value="©LinkCmd.label;"
|
||||
accesskey="©LinkCmd.accesskey;"
|
||||
oncommand="contextMenu.copyLink();"/>
|
||||
<menuitem id="context-copyimage"
|
||||
value="©ImageCmd.label;"
|
||||
accesskey="©ImageCmd.accesskey;"
|
||||
oncommand="contextMenu.copyImage();"/>
|
||||
<menuseparator id="messagePaneContext-sep-copy"/>
|
||||
<menuitem id="context-savelink"
|
||||
value="&saveLinkCmd.label;"
|
||||
accesskey="&saveLinkCmd.accesskey;"
|
||||
oncommand="contextMenu.saveLink();"/>
|
||||
<menuitem id="context-saveimage"
|
||||
value="&saveImageCmd.label;"
|
||||
accesskey="&saveImageCmd.accesskey;"
|
||||
oncommand="contextMenu.saveImage();"/>
|
||||
</popup>
|
||||
|
||||
<menubar id="mailMenubar">
|
||||
<menu id="menu_File">
|
||||
<menupopup id="menu_FilePopup">
|
||||
|
@ -387,9 +585,9 @@ Rights Reserved.
|
|||
<menu value="&msgMenu.label;">
|
||||
<menupopup>
|
||||
<menuitem value="&newMsgCmd.label;" oncommand="MsgNewMessage(event);"/>
|
||||
<menuitem value="&replyMsgCmd.label;" oncommand="MsgReplyMessage(event);"/>
|
||||
<menuitem value="&replyToAllMsgCmd.label;" oncommand="MsgReplyToAllMessage(event);"/>
|
||||
<menuitem value="&forwardMsgCmd.label;" oncommand="MsgForwardMessage(event);"/>
|
||||
<menuitem value="&replyMsgCmd.label;" oncommand="MsgReplyMessage(event);"/>
|
||||
<menuitem value="&replyToAllMsgCmd.label;" oncommand="MsgReplyToAllMessage(event);"/>
|
||||
<menuitem value="&forwardMsgCmd.label;" oncommand="MsgForwardMessage(event);"/>
|
||||
<menu value="&forwardAsMenu.label;">
|
||||
<menupopup>
|
||||
<menuitem value="&forwardAsInline.label;" oncommand="MsgForwardAsInline(event);"/>
|
||||
|
|
|
@ -44,11 +44,17 @@ Rights Reserved.
|
|||
windowtype="mail:messageWindow">
|
||||
|
||||
|
||||
<html:script src="chrome://global/content/strres.js"/>
|
||||
<html:script src="chrome://messenger/content/commandglue.js"/>
|
||||
<html:script src="chrome://messenger/content/mailWindow.js"/>
|
||||
<html:script src="chrome://messenger/content/messageWindow.js"/>
|
||||
<html:script src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script src="chrome://global/content/strres.js"/>
|
||||
<script src="chrome://messenger/content/commandglue.js"/>
|
||||
<script src="chrome://messenger/content/mailWindow.js"/>
|
||||
<script src="chrome://messenger/content/messageWindow.js"/>
|
||||
<script src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script src="chrome://navigator/content/nsContextMenu.js"/>
|
||||
<script src="chrome://navigator/content/navigator.js"/>
|
||||
<script src="chrome://messenger/content/mailContextMenus.js"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<broadcasterset id="broadcasterset"/>
|
||||
<keyset id="keyset"/>
|
||||
|
@ -58,6 +64,7 @@ Rights Reserved.
|
|||
<menuitem value="&AddToAddressBook.label;" oncommand="AddNodeToAddressBook(document.popupNode)"/>
|
||||
<menuitem value="&SendMailTo.label;" oncommand="SendMailToNode(document.popupNode)"/>
|
||||
</popup>
|
||||
<popup id="messagePaneContext"/>
|
||||
</popupset>
|
||||
<menubar id="mailMenubar"/>
|
||||
|
||||
|
@ -67,7 +74,7 @@ Rights Reserved.
|
|||
<toolbox id="msgHeaderView"/>
|
||||
|
||||
<!-- message view -->
|
||||
<html:iframe id="messagepane" style="height: 0px" flex="1" name="messagepane" type="content" src="about:blank"/>
|
||||
<iframe id="messagepane" context="messagePaneContext" style="height: 0px" flex="1" name="messagepane" type="content-primary" src="about:blank"/>
|
||||
</box>
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,13 @@ Rights Reserved.
|
|||
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://messenger/locale/messenger.dtd">
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
|
||||
%messengerDTD;
|
||||
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
|
||||
%navigatorDTD;
|
||||
]>
|
||||
|
||||
<window id="messengerWindow"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
|
@ -58,6 +63,8 @@ Rights Reserved.
|
|||
<script src="chrome://messenger/content/mailContextMenus.js"/>
|
||||
<script src="chrome://messenger/content/messengerdnd.js"/>
|
||||
<script src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script src="chrome://navigator/content/nsContextMenu.js"/>
|
||||
<script src="chrome://navigator/content/navigator.js"/>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_Mail"
|
||||
|
@ -80,10 +87,6 @@ Rights Reserved.
|
|||
value="&contextOpenNewWindow.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgOpenNewWindowForMessage();"/>
|
||||
<menuitem id="threadPaneContext-editAsNew"
|
||||
value="&contextEditAsNew.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgEditMessageAsNew();"/>
|
||||
<menuseparator id="threadPaneContext-sep-open"/>
|
||||
<menuitem id="threadPaneContext-replySender"
|
||||
value="&contextReplySender.label;"
|
||||
|
@ -93,10 +96,18 @@ Rights Reserved.
|
|||
value="&contextReplyAll.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgReplyToAllMessage(event);"/>
|
||||
<menuitem id="threadPaneContext-replyNewsgroup"
|
||||
value="&contextReplyNewsgroup.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgReplyMessage(event);"/>
|
||||
<menuitem id="threadPaneContext-forward"
|
||||
value="&contextForward.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgForwardMessage(event);"/>
|
||||
<menuitem id="threadPaneContext-editAsNew"
|
||||
value="&contextEditAsNew.label;"
|
||||
accesskey=""
|
||||
oncommand="MsgEditMessageAsNew();"/>
|
||||
<menuseparator id="threadPaneContext-sep-reply"/>
|
||||
<menu id="threadPaneContext-moveMenu"
|
||||
value="&contextMoveMsgMenu.label;"
|
||||
|
@ -281,7 +292,8 @@ Rights Reserved.
|
|||
oncommand="AddNodeToAddressBook(document.popupNode)"/>
|
||||
<menuitem value="&SendMailTo.label;"
|
||||
oncommand="SendMailToNode(document.popupNode)"/>
|
||||
</popup>
|
||||
</popup>
|
||||
<popup id="messagePaneContext"/>
|
||||
</popupset>
|
||||
|
||||
|
||||
|
@ -309,7 +321,7 @@ Rights Reserved.
|
|||
|
||||
<tree id="threadTree" flex="2" style="height:0px" context="threadPaneContext"/>
|
||||
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePnae() -->
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
|
||||
<splitter id="gray_horizontal_splitter" collapse="after" persist="state"
|
||||
onclick="OnClickThreadAndMessagePaneSplitter()"/>
|
||||
|
||||
|
@ -318,7 +330,7 @@ Rights Reserved.
|
|||
<toolbox id="msgHeaderView"/>
|
||||
|
||||
<!-- message view -->
|
||||
<html:iframe id="messagepane" style="height: 0px" flex="1" name="messagepane" type="content" src="about:blank"/>
|
||||
<iframe id="messagepane" context="messagePaneContext" style="height: 0px" flex="1" name="messagepane" type="content-primary" src="about:blank"/>
|
||||
</box>
|
||||
<box id="status-bar">
|
||||
<box align="vertical" style="width:100px">
|
||||
|
|
|
@ -820,11 +820,14 @@ function GetLoadedMsgFolder()
|
|||
|
||||
function GetLoadedMessage()
|
||||
{
|
||||
var messageResource = RDF.GetResource(gCurrentDisplayedMessage);
|
||||
if(messageResource)
|
||||
if(gCurrentDisplayedMessage)
|
||||
{
|
||||
var message = messageResource.QueryInterface(Components.interfaces.nsIMessage);
|
||||
return message;
|
||||
var messageResource = RDF.GetResource(gCurrentDisplayedMessage);
|
||||
if(messageResource)
|
||||
{
|
||||
var message = messageResource.QueryInterface(Components.interfaces.nsIMessage);
|
||||
return message;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
|
@ -839,7 +842,8 @@ function GetCompositeDataSource(command)
|
|||
return folderTree.database;
|
||||
}
|
||||
else if(command == "DeleteMessages" || command == "MarkMessageRead" ||
|
||||
command == "MarkMessageFlagged" || command == "MarkThreadAsRead")
|
||||
command == "MarkMessageFlagged" || command == "MarkThreadAsRead" ||
|
||||
command == "MessageProperty")
|
||||
{
|
||||
var threadTree = GetThreadTree();
|
||||
return threadTree.database;
|
||||
|
|
|
@ -278,6 +278,7 @@ Rights Reserved.
|
|||
<!ENTITY contextOpenNewWindow.label "Open in New Window">
|
||||
<!ENTITY contextEditAsNew.label "Edit As New...">
|
||||
<!ENTITY contextReplySender.label "Reply To Sender">
|
||||
<!ENTITY contextReplyNewsgroup.label "Reply To Newsgroup">
|
||||
<!ENTITY contextReplyAll.label "Reply To All">
|
||||
<!ENTITY contextForward.label "Forward">
|
||||
<!ENTITY contextMoveMsgMenu.label "Move To">
|
||||
|
|
Загрузка…
Ссылка в новой задаче