This commit is contained in:
blakeross%telocity.com 2002-10-03 19:33:07 +00:00
Родитель edbd81b257
Коммит b66fb1989e
27 изменённых файлов: 424 добавлений и 11341 удалений

Просмотреть файл

@ -110,14 +110,8 @@ function setTitleFromFolder(msgfolder, subject)
else
title = "";
if (msgfolder.isServer)
{
if (server.type == "none")
title += server.prettyName;
else
// <hostname>
title += server.hostName;
}
if (msgfolder.isServer)
title += server.prettyName;
else {
var middle;
var end;
@ -329,12 +323,7 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder)
oldFolder.setMsgDatabase(null);
}
// that should have initialized gDBView, now re-root the thread pane
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView);
if (treeView)
{
var tree = GetThreadTree();
tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject).view = treeView;
}
RerootThreadPane();
SetUpToolbarButtons(uri);
@ -489,6 +478,9 @@ function ConvertColumnIDToSortType(columnID)
case "labelCol":
sortKey = nsMsgViewSortType.byLabel;
break;
case "scoreCol":
sortKey = nsMsgViewSortType.byScore;
break;
default:
dump("unsupported sort column: " + columnID + "\n");
sortKey = 0;
@ -544,6 +536,9 @@ function ConvertSortTypeToColumnID(sortKey)
// there is no orderReceivedCol, so return null
columnID = null;
break;
case nsMsgViewSortType.byScore:
columnID = "scoreCol";
break;
default:
dump("unsupported sort key: " + sortKey + "\n");
columnID = null;
@ -574,6 +569,9 @@ function CreateBareDBView(originalView, msgFolder, viewType, viewFlags, sortType
viewType = viewType - 0;
switch (viewType) {
case nsMsgViewType.eShowQuickSearchResults:
dbviewContractId += "quicksearch";
break;
case nsMsgViewType.eShowThreadsWithUnread:
dbviewContractId += "threadswithunread";
break;
@ -658,22 +656,38 @@ function GetSelectedFolderResource()
return GetFolderResource(folderTree, startIndex.value);
}
function NotifyChangedMessagePaneVisibility(now_hidden)
{
var event = document.createEvent('Events');
if (now_hidden) {
event.initEvent('messagepane-hide', false, true);
}
else {
event.initEvent('messagepane-unhide', false, true);
}
document.getElementById("messengerWindow").dispatchEvent(event);
}
function OnMouseUpThreadAndMessagePaneSplitter()
{
{
// the collapsed state is the state after we released the mouse
// so we take it as it is
var now_hidden = IsThreadAndMessagePaneSplitterCollapsed();
if (gDBView) {
// the collapsed state is the state after we released the mouse
// so we take it as it is
gDBView.suppressMsgDisplay = IsThreadAndMessagePaneSplitterCollapsed();
}
gDBView.suppressMsgDisplay = now_hidden;
}
NotifyChangedMessagePaneVisibility(now_hidden);
}
function OnClickThreadAndMessagePaneSplitterGrippy()
{
{
// the collapsed state is the state when we clicked on the grippy
// not when afterwards, so we need to reverse this value
var now_hidden = !IsThreadAndMessagePaneSplitterCollapsed();
if (gDBView) {
// the collapsed state is the state when we clicked on the grippy
// not when afterwards, so we need to reverse this value
gDBView.suppressMsgDisplay = !IsThreadAndMessagePaneSplitterCollapsed();
}
gDBView.suppressMsgDisplay = now_hidden;
}
NotifyChangedMessagePaneVisibility(now_hidden);
}
function FolderPaneSelectionChange()
@ -734,14 +748,23 @@ function FolderPaneSelectionChange()
dump("failed to get view & sort values. ex = " + ex +"\n");
}
}
if (gDBView && gDBView.isSearchView)
if (gDBView && gDBView.viewType == nsMsgViewType.eShowQuickSearchResults)
{
gDBView.isSearchView = false; //reset the search input on folder switch
var searchInput = document.getElementById("searchInput");
if (gPreQuickSearchView) //close cached view before quick search
{
gPreQuickSearchView.close();
gPreQuickSearchView = null;
}
var searchInput = document.getElementById("searchInput"); //reset the search input on folder switch
if (searchInput)
searchInput.value = "";
}
ClearMessagePane();
if (gSearchEmailAddress || gDefaultSearchViewTerms)
viewType = nsMsgViewType.eShowQuickSearchResults;
else if (viewType == nsMsgViewType.eShowQuickSearchResults)
viewType = nsMsgViewType.eShowAllThreads; //override viewType - we don't want to start w/ quick search
ChangeFolderByURI(folderResource.Value, viewType, viewFlags, sortType, sortOrder);
}
}

Просмотреть файл

@ -13,8 +13,8 @@
chrome:displayName="Messenger"
chrome:author="mozilla.org"
chrome:name="messenger"
chrome:localeVersion="1.1b"
chrome:skinVersion="1.0">
chrome:localeVersion="1.2a"
chrome:skinVersion="1.2">
</RDF:Description>
<!-- overlay information -->
@ -25,6 +25,7 @@
<RDF:li resource="chrome://cookie/content/pref-cookies.xul"/>
<RDF:li resource="chrome://cookie/content/pref-images.xul"/>
<RDF:li resource="chrome://navigator/content/navigatorOverlay.xul"/>
<RDF:li resource="chrome://messenger/content/messenger.xul"/>
<RDF:li resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul"/>
<RDF:li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
<RDF:li resource="chrome://messenger/content/addressbook/addressbook.xul"/>
@ -70,6 +71,9 @@
</RDF:Seq>
<!-- messenger items for Messenger -->
<RDF:Seq about="chrome://messenger/content/messenger.xul">
<RDF:li>chrome://messenger/content/mailMessengerOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://messenger/content/mail3PaneWindowVertLayout.xul">
<RDF:li>chrome://messenger/content/mailMessengerOverlay.xul</RDF:li>
</RDF:Seq>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,203 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/mailWindow2.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/platformMailnewsOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/threadPane.xul"?>
<?xul-overlay href="chrome://messenger/content/folderPane.xul"?>
<?xul-overlay href="chrome://messenger/content/msgHdrViewOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
%messengerDTD;
]>
<window id="messengerWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:nc="http://home.netscape.com/NC-rdf#"
title="&messengerWindow.title;"
titlemodifier="&titleModifier.label;"
titlemenuseparator="&titleSeparator.label;"
onload="OnLoadMessenger()"
onunload="OnUnloadMessenger()"
width="750"
height="500"
screenX="10" screenY="10"
persist="width height screenX screenY sizemode"
windowtype="mail:3pane">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_search" src="chrome://messenger/locale/search.properties"/>
</stringbundleset>
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/shareglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/msgViewNavigation.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/msgMail3PaneWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mail3PaneWindowCommands.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailContextMenus.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/messengerdnd.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mail-offline.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/searchBar.js"/>
<commandset id="mailCommands">
<commandset id="mailFileMenuItems"/>
<commandset id="mailViewMenuItems"/>
<commandset id="mailEditMenuItems"/>
<commandset id="mailEditContextMenuItems"/>
<commandset id="mailSearchMenuItems"/>
<commandset id="mailGoMenuItems"/>
<commandset id="mailMessageMenuItems"/>
<commandset id="mailToolbarItems"/>
<commandset id="mailGetMsgMenuItems"/>
<commandset id="mailMarkMenuItems"/>
<commandset id="mailLabelMenuItems"/>
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<commandset id="FocusRingUpdate_Mail"
commandupdater="true"
events="focus"
oncommandupdate="FocusRingUpdate_Mail()"/>
<commandset id="tasksCommands"/>
<command id="toggleSidebar"/>
</commandset>
<broadcasterset id="mailBroadcasters">
<!-- File Menu -->
<broadcaster id="Communicator:WorkMode"/>
<!-- Edit Menu -->
</broadcasterset>
<keyset id="mailKeys">
<key id="showHideSidebar"/>
<keyset id="tasksKeys"/>
</keyset>
<popup id="threadPaneContext"/>
<popup id="folderPaneContext"/>
<popup id="attachmentListContext"/>
<tooltip id="attachmentListTooltip"/>
<popup id="emailAddressPopup" popupanchor="bottomleft" onpopupshowing="goUpdateCommand('cmd_createFilterFromPopup')">
<menuitem label="&AddToAddressBook.label;"
accesskey="&AddToAddressBook.accesskey;"
oncommand="AddNodeToAddressBook(document.popupNode)"/>
<menuitem label="&SendMailTo.label;"
accesskey="&SendMailTo.accesskey;"
oncommand="SendMailToNode(document.popupNode)"/>
<menuitem label="&CopyEmailAddress.label;"
accesskey="&CopyEmailAddress.accesskey;"
oncommand="CopyEmailAddress(document.popupNode)"/>
<menuitem label="&CreateFilter.label;"
accesskey="&CreateFilter.accesskey;"
oncommand="CreateFilter(document.popupNode)"
observes="cmd_createFilterFromPopup"/>
</popup>
<popup id="allHeadersPopup" onpopupshowing="return fillAllHeadersPopup(document.popupNode);" popupanchor="bottomleft">
<hbox id="allHeadersPopupContainer">
</hbox>
</popup>
<popup id="messagePaneContext"/>
<popup id="sidebarPopup"/>
<toolbox id="mailToolbarToolbox" class="toolbox-top">
<menubar id="mailMenubar"/>
</toolbox>
<!-- The main mail three pane frame -->
<hbox style="height:100px" flex="1">
<vbox id="sidebar-box" persist="collapsed width"/>
<splitter id="sidebar-splitter" state="collapsed"/>
<vbox flex="1">
<hbox id="mail3PaneVertLayoutBox" persist="collapsed height" flex="1">
<vbox id="folderPaneBox" flex="1" autostretch="always" persist="width">
<tree id="folderTree" flex="1" style="width:0px;" context="folderPaneContext" persist="collapsed width height"/>
</vbox>
<splitter id="gray_vertical_splitter" collapse="before" persist="state">
<grippy/>
</splitter>
<hbox id="mail3PaneVertLayoutBox" persist="collapsed width" flex="2">
<vbox id="searchAndthreadpaneBox" persist="width" flex ="1">
<vbox id="messagesBox" flex="1">
<hbox id="searchBox"/>
<vbox id="threadpaneBox" flex="1" persist="width">
<tree id="threadTree" flex="1" persist="width" style="width:0px" context="threadPaneContext"/>
</vbox>
</vbox>
</vbox>
<hbox id="accountCentralBox" flex="1" persist="width">
<iframe name="accountCentralPane" style="width:0px;" flex="1" src="about:blank"/>
</hbox>
</hbox>
</hbox>
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
<splitter id="threadpane-splitter" collapse="after" persist="state"
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()">
<grippy onclick="OnClickThreadAndMessagePaneSplitterGrippy()"/>
</splitter>
<!-- msg header view -->
<vbox id="messagepanebox" flex="4" persist="collapsed height">
<hbox id="msgHeaderView"/>
<!-- message view -->
<browser id="messagepane" context="messagePaneContext"
style="height: 0px" flex="1" name="messagepane"
disablehistory="true" type="content-primary" src="about:blank"
disablesecurity="true" onclick="contentAreaClick(event);"/>
</vbox>
</vbox>
</hbox>
<statusbar id="status-bar" class="mailwindow-statusbar">
<statusbarpanel id="unreadMessageCount" style="min-width: 5px"/>
<statusbarpanel id="totalMessageCount" style="min-width: 5px"/>
</statusbar>
</window>

Просмотреть файл

@ -1,447 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
function DoRDFCommand(dataSource, command, srcArray, argumentArray)
{
var commandResource = RDF.GetResource(command);
if(commandResource) {
try {
dataSource.DoCommand(srcArray, commandResource, argumentArray);
}
catch(e) {
if (command == "http://home.netscape.com/NC-rdf#NewFolder") {
throw(e); // so that the dialog does not automatically close.
}
dump("Exception : In mail commands\n");
}
}
}
function ConvertMessagesToResourceArray(messages, resourceArray)
{
dump("fix or remove this\n");
// going away...
}
function GetNewMessages(selectedFolders, compositeDataSource)
{
var numFolders = selectedFolders.length;
if(numFolders > 0)
{
var msgFolder = selectedFolders[0];
//Whenever we do get new messages, clear the old new messages.
if(msgFolder)
{
var nsIMsgFolder = Components.interfaces.nsIMsgFolder;
msgFolder.biffState = nsIMsgFolder.nsMsgBiffState_NoMail;
if (msgFolder.hasNewMessages)
msgFolder.clearNewMessages();
}
if(compositeDataSource)
{
var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource);
var folderArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
folderArray.AppendElement(folderResource);
DoRDFCommand(compositeDataSource, "http://home.netscape.com/NC-rdf#GetNewMessages", folderArray, null);
}
}
else {
dump("Nothing was selected\n");
}
}
function DeleteMessages(compositeDataSource, srcFolder, messages, reallyDelete)
{
dump("fix or remove this\n");
// going away...
}
function CopyMessages(compositeDataSource, srcFolder, destFolder, messages, isMove)
{
dump("fix or remove this\n");
// going away...
}
function getIdentityForServer(server)
{
var identity = null;
if(server) {
// get the identity associated with this server
var identities = accountManager.GetIdentitiesForServer(server);
// dump("identities = " + identities + "\n");
// just get the first one
if (identities.Count() > 0 ) {
identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity);
}
}
return identity;
}
function GetNextNMessages(folder)
{
if (folder) {
var newsFolder = folder.QueryInterface(Components.interfaces.nsIMsgNewsFolder);
if (newsFolder) {
newsFolder.getNextNMessages(msgWindow);
}
}
}
// type is a nsIMsgCompType and format is a nsIMsgCompFormat
function ComposeMessage(type, format, folder, messageArray)
{
var msgComposeType = Components.interfaces.nsIMsgCompType;
var identity = null;
var newsgroup = null;
var server;
//dump("ComposeMessage folder="+folder+"\n");
try
{
if(folder)
{
// get the incoming server associated with this uri
server = folder.server;
// if they hit new or reply and they are reading a newsgroup
// turn this into a new post or a reply to group.
if (!folder.isServer && server.type == "nntp" && type == msgComposeType.New)
{
type = msgComposeType.NewsPost;
newsgroup = folder.folderURL;
}
identity = getIdentityForServer(server);
// dump("identity = " + identity + "\n");
}
}
catch (ex)
{
dump("failed to get an identity to pre-select: " + ex + "\n");
}
//dump("\nComposeMessage from XUL: " + identity + "\n");
var uri = null;
if (! msgComposeService)
{
dump("### msgComposeService is invalid\n");
return;
}
if (type == msgComposeType.New) //new message
{
//dump("OpenComposeWindow with " + identity + "\n");
// if the addressbook sidebar panel is open and has focus, get
// the selected addresses from it
if (document.commandDispatcher.focusedWindow.document.documentElement.hasAttribute("selectedaddresses"))
NewMessageToSelectedAddresses(type, format, identity);
else
msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow);
return;
}
else if (type == msgComposeType.NewsPost)
{
//dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n");
msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity, msgWindow);
return;
}
messenger.SetWindow(window, msgWindow);
var object = null;
if (messageArray && messageArray.length > 0)
{
uri = "";
for (var i = 0; i < messageArray.length; i ++)
{
var messageUri = messageArray[i];
if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline ||
type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender ||
type == msgComposeType.ReplyToSenderAndGroup ||
type == msgComposeType.Template || type == msgComposeType.Draft)
{
msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity, msgWindow);
//limit the number of new compose windows to 8. Why 8? I like that number :-)
if (i == 7)
break;
}
else
{
if (i)
uri += ","
uri += messageUri;
}
}
if (type == msgComposeType.ForwardAsAttachment)
msgComposeService.OpenComposeWindow(null, uri, type, format, identity, msgWindow);
}
else
dump("### nodeList is invalid\n");
}
function NewMessageToSelectedAddresses(type, format, identity) {
var abSidebarPanel = document.commandDispatcher.focusedWindow;
var abResultsTree = abSidebarPanel.document.getElementById("abResultsTree");
var abResultsBoxObject = abResultsTree.treeBoxObject;
var abView = abResultsBoxObject.view;
abView = abView.QueryInterface(Components.interfaces.nsIAbView);
var addresses = abView.selectedAddresses;
var params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams);
if (params) {
params.type = type;
params.format = format;
params.identity = identity;
var composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"].createInstance(Components.interfaces.nsIMsgCompFields);
if (composeFields) {
var addressList = "";
for (var i = 0; i < addresses.Count(); i++) {
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsCString).data;
}
composeFields.to = addressList;
params.composeFields = composeFields;
msgComposeService.OpenComposeWindowWithParams(null, params);
}
}
}
function CreateNewSubfolder(chromeWindowURL, preselectedMsgFolder,
dualUseFolders, callBackFunctionName)
{
var preselectedURI;
if(preselectedMsgFolder)
{
var preselectedFolderResource = preselectedMsgFolder.QueryInterface(Components.interfaces.nsIRDFResource);
if(preselectedFolderResource)
preselectedURI = preselectedFolderResource.Value;
dump("preselectedURI = " + preselectedURI + "\n");
}
var dialog = window.openDialog(
chromeWindowURL,
"",
"chrome,titlebar,modal",
{preselectedURI:preselectedURI,
dualUseFolders:dualUseFolders,
okCallback:callBackFunctionName});
}
function NewFolder(name,uri)
{
//dump("uri,name = " + uri + "," + name + "\n");
if (uri && (uri != "") && name && (name != "")) {
var selectedFolderResource = RDF.GetResource(uri);
//dump("selectedFolder = " + uri + "\n");
var compositeDataSource = GetCompositeDataSource("NewFolder");
var folderArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
var nameArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
folderArray.AppendElement(selectedFolderResource);
var nameLiteral = RDF.GetLiteral(name);
nameArray.AppendElement(nameLiteral);
DoRDFCommand(compositeDataSource, "http://home.netscape.com/NC-rdf#NewFolder", folderArray, nameArray);
}
else {
dump("no name or nothing selected\n");
}
}
function UnSubscribe(folder)
{
// Unsubscribe the current folder from the newsserver, this assumes any confirmation has already
// been made by the user SPL
var server = folder.server;
var subscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer);
subscribableServer.unsubscribe(folder.name);
subscribableServer.commitSubscribeChanges();
}
function Subscribe(preselectedMsgFolder)
{
var preselectedURI;
if(preselectedMsgFolder)
{
var preselectedFolderResource = preselectedMsgFolder.QueryInterface(Components.interfaces.nsIRDFResource);
if(preselectedFolderResource)
preselectedURI = preselectedFolderResource.Value;
dump("preselectedURI = " + preselectedURI + "\n");
}
window.openDialog("chrome://messenger/content/subscribe.xul",
"subscribe", "chrome,modal,titlebar,resizable=yes",
{preselectedURI:preselectedURI,
okCallback:SubscribeOKCallback});
}
function SubscribeOKCallback(changeTable)
{
for (var serverURI in changeTable) {
var folder = GetMsgFolderFromUri(serverURI, true);
var server = folder.server;
var subscribableServer =
server.QueryInterface(Components.interfaces.nsISubscribableServer);
for (var name in changeTable[serverURI]) {
if (changeTable[serverURI][name] == true) {
try {
subscribableServer.subscribe(name);
}
catch (ex) {
dump("failed to subscribe to " + name + ": " + ex + "\n");
}
}
else if (changeTable[serverURI][name] == false) {
try {
subscribableServer.unsubscribe(name);
}
catch (ex) {
dump("failed to unsubscribe to " + name + ": " + ex + "\n");
}
}
else {
// no change
}
}
try {
subscribableServer.commitSubscribeChanges();
}
catch (ex) {
dump("failed to commit the changes: " + ex + "\n");
}
}
}
function SaveAsFile(uri)
{
if (uri) messenger.saveAs(uri, true, null, msgWindow);
}
function SaveAsTemplate(uri, folder)
{
if (uri) {
var identity = getIdentityForServer(folder.server);
messenger.saveAs(uri, false, identity, msgWindow);
}
}
function MarkSelectedMessagesRead(markRead)
{
if (markRead) {
gDBView.doCommand(nsMsgViewCommandType.markMessagesRead);
}
else {
gDBView.doCommand(nsMsgViewCommandType.markMessagesUnread);
}
}
function MarkSelectedMessagesFlagged(markFlagged)
{
if (markFlagged) {
gDBView.doCommand(nsMsgViewCommandType.flagMessages);
}
else {
gDBView.doCommand(nsMsgViewCommandType.unflagMessages);
}
}
function MarkAllMessagesRead(compositeDataSource, folder)
{
var folderResource = folder.QueryInterface(Components.interfaces.nsIRDFResource);
var folderArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
folderArray.AppendElement(folderResource);
DoRDFCommand(compositeDataSource, "http://home.netscape.com/NC-rdf#MarkAllMessagesRead", folderArray, null);
}
function DownloadFlaggedMessages(compositeDataSource, folder)
{
dump("fix DownloadFlaggedMessages()\n");
}
function DownloadSelectedMessages(compositeDataSource, messages, markFlagged)
{
dump("fix DownloadSelectedMessages()\n");
}
function ViewPageSource(messages)
{
var url;
var uri;
var mailSessionContractID = "@mozilla.org/messenger/services/session;1";
var numMessages = messages.length;
if (numMessages == 0)
{
dump("MsgViewPageSource(): No messages selected.\n");
return false;
}
// First, get the mail session
var mailSession = Components.classes[mailSessionContractID].getService();
if (!mailSession)
return false;
mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession);
if (!mailSession)
return false;
for(var i = 0; i < numMessages; i++)
{
uri = messages[i];
// Now, we need to get a URL from a URI
url = mailSession.ConvertMsgURIToMsgURL(uri, msgWindow);
if (url) {
// XXX what if there already is a "?", like "?part=0"
// XXX shouldn't this be "&header=src" in that case?
url += "?header=src";
}
// Use a browser window to view source
window.openDialog( getBrowserURL(),
"_blank",
"scrollbars,resizable,chrome,dialog=no",
url,
"view-source" );
}
return true;
}
function doHelpButton()
{
openHelp("mail-offline-items");
}

Просмотреть файл

@ -1,158 +0,0 @@
<?xml version="1.0"?>
<!-- retrieve generic commands -->
<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/mailNavigatorOverlay.dtd" >
<overlay id="mailNavigatorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript">
<![CDATA[
function getCurrentIdentityKey()
{
try
{
var cwindowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
var iwindowManager = Components.interfaces.nsIWindowMediator;
var windowManager = cwindowManager.QueryInterface(iwindowManager);
var mailWindow = windowManager.getMostRecentWindow('mail:3pane');
var folder = mailWindow.GetFirstSelectedMsgFolder();
var server = folder.server;
if (server.type == "nntp")//if the account is a news account use default identity
return null;
else {
var identity = mailWindow.getIdentityForServer(server);
return identity;
}
}
catch(ex) {
return null;
}
}
// attachment: 0 - link
// 1 - page
// 2 - image
function openComposeWindow(url, title, attachment)
{
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)
{
if (attachment == 0 || attachment == 1)
{
params.composeFields.body = url;
params.composeFields.subject = title;
params.bodyIsLink = true;
}
if (attachment == 1 || attachment == 2)
{
var attachmentData = Components.classes["@mozilla.org/messengercompose/attachment;1"].createInstance(Components.interfaces.nsIMsgAttachment);
if (attachmentData)
{
attachmentData.url = url;
params.composeFields.addAttachment(attachmentData);
}
}
params.identity = getCurrentIdentityKey();
var composeService = Components.classes["@mozilla.org/messengercompose;1"].getService(Components.interfaces.nsIMsgComposeService);
if (composeService)
composeService.OpenComposeWindowWithParams(null, params);
}
}
}
function sendLink(pageUrl, pageTitle)
{
try {
openComposeWindow(pageUrl, pageTitle, 0);
} catch(ex) { dump("Cannot Send Link: " + ex + "\n"); }
}
function sendImage(imageURL)
{
try {
openComposeWindow(imageURL, null, 2);
} catch(ex) { dump("Cannot Send Image: " + ex + "\n"); }
}
function sendPage(aDocument)
{
if (!aDocument)
aDocument = window._content.document;
var pageUrl = aDocument.URL;
var pageTitle = aDocument.title;
try {
openComposeWindow(pageUrl, pageTitle, 1);
} catch(ex) { dump("Cannot Send Page: " + ex + "\n"); }
}
function initMailContextMenuItems(aEvent)
{
var shouldShowSendPage = !(gContextMenu.onTextInput || gContextMenu.isTextSelected) && !(gContextMenu.onLink && gContextMenu.onImage);
gContextMenu.showItem("context-sendpage", shouldShowSendPage);
gContextMenu.showItem("context-sep-apps", gContextMenu.shouldShowSeparator("context-sep-apps"));
}
var gAddedMailContextMenuPopupListener = false;
function initMailContextMenuPopupListener(aEvent)
{
// This is really lame, but we can't seem to add a bubbling listener to the DOMWindow (!)
if (gAddedMailContextMenuPopupListener)
return;
var popup = document.getElementById("contentAreaContextMenu");
popup.addEventListener("popupshowing", initMailContextMenuItems, false);
gAddedMailContextMenuPopupListener = true;
}
addEventListener("load", initMailContextMenuPopupListener, true);
]]>
</script>
<!-- navigator specific commands -->
<commandset id="tasksCommands">
<command id="cmd_sendPage" oncommand="sendPage();"/>
<command id="Browser:SendLink" oncommand="sendLink(window._content.location.href, window._content.document.title);"/>
</commandset>
<!-- navigator specific UI items -->
<menupopup id="menu_NewPopup">
<menuitem id="menu_newCard" insertafter="navBeginGlobalNewItems"/>
<menuitem id="menu_newMessage" insertafter="navBeginGlobalNewItems"/>
</menupopup>
<menupopup id="menu_FilePopup">
<menuitem id="menu_sendPage" label="&sendPage.label;" accesskey="&sendPage.accesskey;" command="cmd_sendPage" position="9"/>
<menuitem id="menu_sendLink" label="&sendLinkCmd.label;" accesskey="&sendLinkCmd.accesskey;" command="Browser:SendLink" position="10"/>
</menupopup>
<popup id="contentAreaContextMenu">
<menuitem id="context-sendpage"
label="&contextSendPage.label;"
accesskey="&contextSendPage.accesskey;"
oncommand="sendPage();"
insertafter="context-savepage"/>
<menuitem id="context-sendimage"
label="&contextSendImage.label;"
accesskey="&contextSendImage.accesskey;"
oncommand="sendImage(gContextMenu.imageURL);"
insertafter="context-saveimage"/>
<menu id="frame">
<menupopup id="frame_popup">
<menuitem insertafter="saveframeas"
label="&contextSendFrame.label;"
accesskey="&contextSendFrame.accesskey;"
oncommand="sendPage(gContextMenu.target.ownerDocument);"/>
</menupopup>
</menu>
</popup>
</overlay>

Просмотреть файл

@ -1,915 +0,0 @@
<?xml version="1.0"?>
<bindings id="mailBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<!-- dummy widget to force this file to load -->
<binding id="dummy" extends="xul:box"/>
<!-- Message Pane Widgets -->
<!-- mail-toggle-headerfield: non email addrss headers which have a toggle associated with them (i.e. the subject).
use label to set the header name.
use headerValue to set the header value. -->
<binding id="mail-toggle-headerfield">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:image class="expandHeaderViewButton" xbl:inherits="onclick=ontwistyclick"/>
<xul:spacer flex="1"/>
<xul:label class="headerName" xbl:inherits="value=label"/>
</xul:hbox>
<xul:label class="headerValue" anonid="headerValue" flex="1">*</xul:label>
</content>
<implementation>
<property name="headerValue" onset="return document.getAnonymousElementByAttribute(this, 'anonid', 'headerValue').firstChild.nodeValue = val;"/>
</implementation>
</binding>
<!-- mail-headerfield: presents standard text header name & value pairs. Don't use this for email addresses.
use label to set the header name.
use headerValue to set the header value. -->
<binding id="mail-headerfield">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
</xul:hbox>
<xul:label class="headerValue" anonid="headerValue" flex="1">*</xul:label>
</content>
<implementation>
<property name="headerValue" onset="return document.getAnonymousElementByAttribute(this, 'anonid', 'headerValue').firstChild.nodeValue = val;" />
</implementation>
</binding>
<binding id="mail-emailheaderfield">
<content>
<xul:hbox class="headerNameBox" align="start">
<xul:label class="headerName" xbl:inherits="value=label" flex="1"/>
</xul:hbox>
<xul:mail-emailaddress anonid="emailAddressNode"/>
</content>
<implementation>
<property name="emailAddressNode" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'emailAddressNode');"
readonly="true"/>
</implementation>
</binding>
<!-- multi-emailHeaderField: presents multiple emailheaderfields with a toggle -->
<binding id="mail-multi-emailHeaderField">
<content>
<xul:hbox class="headerNameBox" align="start" pack="end">
<xul:image class="addresstwisty" anonid="toggleIcon"
onclick="toggleAddressView();"/>
<xul:label class="headerName" xbl:inherits="value=label"/>
</xul:hbox>
<xul:label class="headerValue" anonid="emailAddresses" flex="1"/>
<xul:label class="headerValue" anonid="longEmailAddresses" flex="1" collapsed="true"/>
</content>
<implementation>
<constructor>
<![CDATA[
this.mLongViewCreated = false;
this.mAddresses = new Array;
]]>
</constructor>
<field name="mLongViewCreated"/>
<field name="mAddresses"/>
<!-- as a perf optimization we are going to keep a cache of email address nodes which we've
created around for the lifetime of the widget. mSizeOfAddressCache controls how many of these
elements we keep around -->
<field name="mSizeOfAddressCache">3</field>
<!-- addAddressView: a public method used to add an address to this widget.
aAddresses is an object with 3 properties: displayName, emailAddress and fullAddress
-->
<method name="addAddressView">
<parameter name="aAddress"/>
<body>
<![CDATA[
this.mAddresses.push(aAddress);
]]>
</body>
</method>
<!-- updateEmailAddressNode: private method used to set properties on an address node -->
<method name="updateEmailAddressNode">
<parameter name="aEmailNode"/>
<parameter name="aAddress"/>
<body>
<![CDATA[
aEmailNode.setAttribute("label", aAddress.fullAddress);
aEmailNode.setTextAttribute("emailAddress", aAddress.emailAddress);
aEmailNode.setTextAttribute("fullAddress", aAddress.fullAddress);
aEmailNode.setTextAttribute("displayName", aAddress.displayName);
try
{
if ("AddExtraAddressProcessing" in top)
AddExtraAddressProcessing(aAddress.emailAddress, aEmailNode);
}
catch(ex)
{
dump("AddExtraAddressProcessing failed: " + ex);
}
]]>
</body>
</method>
<!-- fillCachedAddresses: private method used to fill up any cached pre-existing
emailAddress fields without creating new email address fields. Returns a remainder
for the # of addresses which require new addresses being created.
Invariants: 1) aNumAddressesToShow >= 0 && it is <= mAddresses.length -->
<method name="fillCachedAddresses">
<parameter name="aAddressesNode"/>
<parameter name="aNumAddressesToShow"/>
<body>
<![CDATA[
var numExistingCachedAddresses = aAddressesNode.childNodes.length;
if (!numExistingCachedAddresses)
return this.mAddresses.length; // we couldn't pre fill anything
else if (numExistingCachedAddresses > 1)
numExistingCachedAddresses = (numExistingCachedAddresses + 1)/ 2;
var index = 0;
var numAddressesAdded = 0;
var emailAddressNode;
var commaNode;
while (numAddressesAdded < numExistingCachedAddresses && numAddressesAdded < aNumAddressesToShow)
{
if (index && numExistingCachedAddresses > 1)
{
commaNode = aAddressesNode.childNodes[index++];
if (commaNode)
commaNode.removeAttribute('collapsed');
}
// get the node pointed to by index
emailAddressNode = aAddressesNode.childNodes[index++];
this.updateEmailAddressNode(emailAddressNode, this.mAddresses[numAddressesAdded]);
emailAddressNode.removeAttribute('collapsed');
numAddressesAdded++;
}
// if we have added all of our elements but we still have more cached items in this address node
// then make sure the extra cached copies are collapsed...
numExistingCachedAddresses = aAddressesNode.childNodes.length; // reset
while (index < numExistingCachedAddresses)
{
aAddressesNode.childNodes[index++].setAttribute('collapsed', true);
}
return this.mAddresses.length - numAddressesAdded;
]]>
</body>
</method>
<!-- fillAddressesNode: private method used to create email address nodes for either our short
or long view. aAddressesNode: the div we want to add addresses too.
aNumAddressesToShow: number of addresses to put into the list -->
<method name="fillAddressesNode">
<parameter name="aAddressesNode"/>
<parameter name="aNumAddressesToShow"/>
<body>
<![CDATA[
var numAddresses = this.mAddresses.length;
if (aNumAddressesToShow <= 0 || aNumAddressesToShow > numAddresses) // then show all
aNumAddressesToShow = numAddresses;
// before we try to create email address nodes, try to leverage any cached nodes...
var remainder = this.fillCachedAddresses(aAddressesNode, aNumAddressesToShow);
var index = numAddresses - remainder;
while (index < numAddresses && index < aNumAddressesToShow)
{
var newAddressNode = document.createElement("mail-emailaddress");
if (index)
{
var textNode = document.createElement("text");
textNode.setAttribute("value", ", ");
textNode.setAttribute("class", "emailSeparator");
aAddressesNode.appendChild(textNode);
}
var itemInDocument = aAddressesNode.appendChild(newAddressNode);
this.updateEmailAddressNode(itemInDocument, this.mAddresses[index]);
index++;
}
]]>
</body>
</method>
<property name="emailAddresses" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'emailAddresses');"
readonly="true"/>
<property name="longEmailAddresses" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'longEmailAddresses');"
readonly="true"/>
<property name="toggleIcon" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'toggleIcon');"
readonly="true"/>
<!-- buildView: public method used by callers when they are done adding all the email addresses to the widget
aNumAddressesToShow: total # of addresses to show in the short view -->
<method name="buildViews">
<parameter name="aNumAddressesToShow"/>
<body>
<![CDATA[
// always build the short view...its cheap...
this.fillAddressesNode(this.emailAddresses, aNumAddressesToShow);
// if we are currently toggled to show all the email addresses, build the long one too...
if (this.emailAddresses.collapsed)
this.buildLongView();
// make sure the icon is always visible if we have more than the # of addresses to show
this.toggleIcon.collapsed = this.mAddresses.length <= aNumAddressesToShow;
]]>
</body>
</method>
<!-- buildLongView: private method used for delayed construction of the long view -->
<method name="buildLongView">
<body>
<![CDATA[
if (!this.mLongViewCreated)
{
this.fillAddressesNode(this.longEmailAddresses, -1);
this.mLongViewCreated = true;
}
]]>
</body>
</method>
<method name="toggleAddressView">
<body>
<![CDATA[
var shortNode = this.emailAddresses;
var longNode = this.longEmailAddresses;
var imageNode = this.toggleIcon;
// test to see which if short is already collapsed...
if (shortNode.collapsed)
{
longNode.collapsed = true;
shortNode.collapsed = false;
imageNode.removeAttribute("open");
}
else
{
this.buildLongView();
shortNode.collapsed = true;
longNode.collapsed = false;
imageNode.setAttribute("open", "true");
if (!this.mLongViewCreated)
{
// Need to call UpdateMessageHeaders() because this is the first
// time the long view is being built. This is required in order
// to update the addresses of the long view that might contain
// extra image info.
// It should also only be called from toggleAddressView(), not
// from buildView().
UpdateMessageHeaders();
}
}
]]>
</body>
</method>
<!-- internal method used to clear both our divs -->
<method name="clearChildNodes">
<parameter name="aParentNode"/>
<body>
<![CDATA[
// we want to keep around the first mSizeOfAddressCache email address nodes
// don't forget that we have comma text nodes in there too so really we want to keep
// around cache size * 2 - 1.
var numItemsToPreserve = this.mSizeOfAddressCache * 2 - 1;
var numItemsInNode = aParentNode.childNodes.length;
while (numItemsInNode && (numItemsInNode > numItemsToPreserve))
{
aParentNode.removeChild(aParentNode.childNodes[numItemsInNode-1]);
numItemsInNode = numItemsInNode - 1;
}
]]>
</body>
</method>
<method name="clearEmailAddresses">
<body>
<![CDATA[
// clear out our local state
this.mAddresses = new Array;
this.mLongViewCreated = false;
// remove anything inside of each of our labels....
var parentLabel = this.emailAddresses;
if (parentLabel)
this.clearChildNodes(parentLabel);
parentLabel = this.longEmailAddresses;
if (parentLabel)
this.clearChildNodes(parentLabel);
]]>
</body>
</method>
</implementation>
</binding>
<binding id="mail-emailaddress">
<content popup="emailAddressPopup" context="emailAddressPopup">
<xul:label anonid="emailValue" class="emailDisplayButton plain"
xbl:inherits="value=label,crop"/>
<xul:image class="emailDisplayImage" anonid="emailImage"
context="emailAddressPopup" xbl:inherits="src=image"/>
</content>
<implementation>
<property name="label" onset="this.getPart('emailValue').setAttribute('label',val); return val;"
onget="return this.getPart('emailValue').getAttribute('label');"/>
<property name="crop" onset="this.getPart('emailValue').setAttribute('crop',val); return val;"
onget="return this.getPart('emailValue').getAttribute('crop');"/>
<property name="disabled" onset="this.getPart('emailValue').setAttribute('disabled',val); return val;"
onget="return this.getPart('emailValue').getAttribute('disabled');"/>
<property name="src" onset="this.getPart('emailImage').setAttribute('src',val); return val;"
onget="return this.getPart('emailImage').getAttribute('src');"/>
<property name="imgalign" onset="this.getPart('emailImage').setAttribute('imgalign',val); return val;"
onget="return this.getPart('emailImage').getAttribute('imgalign');"/>
<method name="getPart">
<parameter name="aPartId"/>
<body><![CDATA[
return document.getAnonymousElementByAttribute(this, "anonid", aPartId);
]]></body>
</method>
<method name="setTextAttribute">
<parameter name="attributeName"/>
<parameter name="attributeValue"/>
<body><![CDATA[
this.setAttribute(attributeName, attributeValue);
this.getPart("emailImage").setAttribute(attributeName, attributeValue);
this.getPart("emailValue").setAttribute(attributeName, attributeValue);
]]></body>
</method>
<method name="getTextAttribute">
<parameter name="attributeName"/>
<body><![CDATA[
return this.getPart("emailValue").getAttribute(attributeName);
]]></body>
</method>
<method name="GetIconNode">
<body><![CDATA[
return this.getPart("emailImage");
]]></body>
</method>
</implementation>
</binding>
<binding id="search-menulist-abstract" name="searchMenulistAbstract" extends="xul:box">
<content>
<xul:menulist class="search-menulist" xbl:inherits="flex" oncommand="this.parentNode.onSelect(event)">
<xul:menupopup class="search-menulist-popup"/>
</xul:menulist>
</content>
<implementation>
<field name="internalScope">null</field>
<field readonly="true" name="validityManager">
<![CDATA[
Components.classes['@mozilla.org/mail/search/validityManager;1'].getService(Components.interfaces.nsIMsgSearchValidityManager);
]]>
</field>
<property name="searchScope" onget="return this.internalScope;">
<!-- scope ID - retrieve the table -->
<setter>
<![CDATA[
// if scope isn't changing this is a noop
if (this.internalScope == val) return val;
this.internalScope = val;
this.refreshList();
var targets = this.targets;
if (targets) {
for (var i=0; i< targets.length; i++) {
targets[i].searchScope = val;
}
}
return val;
]]>
</setter>
</property>
<property name="validityTable" readonly="true" onget="return this.validityManager.getTable(this.searchScope)"/>
<property name="valueStrings" readonly="true">
<getter>
<![CDATA[
var strings = new Array;
var ids = this.valueIds;
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var hdrs;
try
{
hdrs = pref.getCharPref("mailnews.customHeaders");
}
catch(ex)
{
hdrs=null;
}
var hdrsArray = new Array;
if (hdrs)
hdrsArray = hdrs.split(": ");
var bundle = this.stringBundle;
var j=0;
for (var i=0; i<ids.length; i++)
{
if(ids[i] > Components.interfaces.nsMsgSearchAttrib.OtherHeader && hdrs)
strings[i] = hdrsArray[j++];
else
strings[i] = this.stringBundle.GetStringFromID(ids[i]);
}
return strings;
]]>
</getter>
</property>
<property name="targets" readonly="true">
<getter>
<![CDATA[
var forAttrs = this.getAttribute("for");
if (!forAttrs) return null;
var targetIds = forAttrs.split(",");
if (targetIds.length == 0) return null;
var targets = new Array;
var j=0;
for (var i=0; i<targetIds.length;i++) {
var target = document.getElementById(targetIds[i]);
if (target) targets[j++] = target;
}
return targets;
]]>
</getter>
</property>
<!-- value forwards to the internal menulist's "value" attribute -->
<property name="value" onget="return document.getAnonymousNodes(this)[0].selectedItem.getAttribute('value');">
<setter>
<![CDATA[
var menulist = document.getAnonymousNodes(this)[0];
var dataItems = menulist.getElementsByAttribute("value", val);
if (dataItems.length > 0)
menulist.selectedItem = dataItems[0];
// now notify targets of new parent's value
var targets = this.targets;
if (targets) {
for (var i=0; i< targets.length; i++) {
targets[i].parentValue = val;
}
} else {
//dump("Doh! No targets!\n");
}
return val;
]]>
</setter>
</property>
<!-- label forwards to the internal menulist's "label" attribute -->
<property name="label" onget="return document.getAnonymousNodes(this)[0].selectedItem.getAttribute('label');">
</property>
<method name="refreshList">
<body>
<![CDATA[
var menuItemIds = this.valueIds;
var menuItemStrings = this.valueStrings;
var menulist = document.getAnonymousNodes(this)[0];
var popup = menulist.firstChild;
// save our old "value" so we can restore it later
var oldData = menulist.value;
// remove the old popup children
while (popup.hasChildNodes())
popup.removeChild(popup.lastChild);
var newSelection;
var customizePos=-1;
for (var i=0; i<menuItemIds.length; i++)
{
// create the menuitem
if (Components.interfaces.nsMsgSearchAttrib.OtherHeader == menuItemIds[i].toString())
customizePos = i;
else
{
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", menuItemStrings[i]);
menuitem.setAttribute("value", menuItemIds[i]);
popup.appendChild(menuitem);
// try to restore the selection
if (!newSelection || oldData == menuItemIds[i].toString())
newSelection = menuitem;
}
}
if (customizePos != -1)
{
var separator = document.createElement("menuseparator");
popup.appendChild(separator);
menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", menuItemStrings[customizePos]);
menuitem.setAttribute("value", menuItemIds[customizePos]);
popup.appendChild(menuitem);
}
// now restore the selection
menulist.selectedItem = newSelection;
]]>
</body>
</method>
<method name="onSelect">
<parameter name="event"/>
<body>
<![CDATA[
var menulist = document.getAnonymousNodes(this)[0];
// notify targets
var targets = this.targets;
if (targets) {
for (var i=0; i< targets.length; i++) {
targets[i].parentValue = menulist.value;
}
}
]]>
</body>
</method>
</implementation>
</binding>
<!-- searchattribute - Subject, Sender, To, CC, etc. -->
<binding id="searchattribute" name="searchAttribute"
extends="chrome://messenger/content/mailWidgets.xml#search-menulist-abstract">
<implementation>
<field name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search-attributes.properties");
]]>
</field>
<property name="valueIds" readonly="true">
<getter>
<![CDATA[
var length = new Object;
return this.validityTable.getAvailableAttributes(length);
]]>
</getter>
</property>
<constructor>
<![CDATA[
initializeTermFromId(this.id);
]]>
</constructor>
</implementation>
</binding>
<!-- searchoperator - Contains, Is Less than, etc -->
<binding id="searchoperator" name="searchOperator"
extends="chrome://messenger/content/mailWidgets.xml#search-menulist-abstract">
<implementation>
<field name="searchAttribute">Components.interfaces.nsMsgSearchAttrib.Default</field>
<field name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search-operators.properties");
]]>
</field>
<property name="valueIds" readonly="true">
<getter>
<![CDATA[
var length = new Object;
return this.validityTable.getAvailableOperators(this.searchAttribute,length);
]]>
</getter>
</property>
<property name="parentValue">
<setter>
<![CDATA[
if (this.searchAttribute == val && val != Components.interfaces.nsMsgSearchAttrib.OtherHeader) return val;
this.searchAttribute = val;
this.refreshList();
if (val == Components.interfaces.nsMsgSearchAttrib.OtherHeader)
{
window.openDialog('chrome://messenger/content/CustomHeaders.xul', "", 'modal,titlebar,chrome', null);
UpdateAfterCustomHeaderChange();
}
return val;
]]>
</setter>
<getter>
<![CDATA[
return this.searchAttribute;
]]>
</getter>
</property>
</implementation>
</binding>
<!-- searchvalue - a widget which dynamically changes it's user interface
depending on what type of data it's supposed to be showing
currently handles arbitrary text entry, and menulists for priority and
status
-->
<binding id="searchvalue" name="searchValue">
<content>
<xul:textbox flex="1" class="search-value-textbox"/>
<xul:menulist flex="1" class="search-value-menulist">
<xul:menupopup class="search-value-popup">
<xul:menuitem value="2" stringTag="priorityLowest" class="search-value-menuitem"/>
<xul:menuitem value="3" stringTag="priorityLow" class="search-value-menuitem"/>
<xul:menuitem value="4" stringTag="priorityNormal" class="search-value-menuitem"/>
<xul:menuitem value="5" stringTag="priorityHigh" class="search-value-menuitem"/>
<xul:menuitem value="6" stringTag="priorityHighest" class="search-value-menuitem"/>
</xul:menupopup>
</xul:menulist>
<xul:menulist flex="1" class="search-value-menulist">
<xul:menupopup class="search-value-popup">
<xul:menuitem value="2" stringTag="replied" class="search-value-menuitem"/>
<xul:menuitem value="1" stringTag="read" class="search-value-menuitem"/>
<xul:menuitem value="1048576" stringTag="new" class="search-value-menuitem"/>
<xul:menuitem value="65536" stringTag="forwarded" class="search-value-menuitem"/>
</xul:menupopup>
</xul:menulist>
<xul:textbox flex="1" class="search-value-textbox"/>
</content>
<implementation>
<field name="internalAttribute">null</field>
<field name="internalValue">null</field>
<!-- parentValue forwards to the attribute -->
<property name="parentValue" onset="return this.searchAttribute=val;"
onget="return this.searchAttribute;"/>
<property name="searchAttribute" onget="return this.internalAttribute;">
<setter>
<![CDATA[
// noop if we're not changing it
if (this.internalAttribute == val) return val;
this.internalAttribute = val;
// we inherit from a deck, so just use it's index attribute
// to hide/show widgets
if (val == Components.interfaces.nsMsgSearchAttrib.Priority)
this.setAttribute("selectedIndex", "1");
else if (val == Components.interfaces.nsMsgSearchAttrib.MsgStatus)
this.setAttribute("selectedIndex", "2");
else if (val == Components.interfaces.nsMsgSearchAttrib.Date)
this.setAttribute("selectedIndex", "3");
else
this.setAttribute("selectedIndex", "0");
return val;
]]>
</setter>
</property>
<property name="value" onget="return this.internalValue;">
<setter>
<![CDATA[
// val is a nsIMsgSearchValue object
this.internalValue = val;
var attrib = val.attrib;
var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
var children = document.getAnonymousNodes(this);
this.searchAttribute = attrib;
if (attrib == nsMsgSearchAttrib.Priority) {
var matchingPriority =
children[1].getElementsByAttribute("value", val.priority);
if (matchingPriority.length > 0)
children[1].selectedItem = matchingPriority[0];
}
else if (attrib == nsMsgSearchAttrib.MsgStatus) {
var matchingStatus =
children[2].getElementsByAttribute("value", val.status);
if (matchingStatus.length > 0)
children[2].selectedItem = matchingStatus[0];
}
else if (attrib == nsMsgSearchAttrib.AgeInDays)
children[0].value = val.age;
else if (attrib == nsMsgSearchAttrib.Date)
children[3].value = convertPRTimeToString(val.date);
else
children[0].value = val.str;
return val;
]]>
</setter>
</property>
<method name="save">
<body>
<![CDATA[
var searchValue = this.value;
var searchAttribute = this.searchAttribute;
var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
var children = document.getAnonymousNodes(this);
searchValue.attrib = searchAttribute;
if (searchAttribute == nsMsgSearchAttrib.Priority) {
searchValue.priority = children[1].selectedItem.value;
}
else if (searchAttribute == nsMsgSearchAttrib.MsgStatus)
searchValue.status = children[2].selectedItem.value;
else if (searchAttribute == nsMsgSearchAttrib.AgeInDays)
searchValue.age = children[0].value;
else if (searchAttribute == nsMsgSearchAttrib.Date)
searchValue.date = convertStringToPRTime(children[3].value);
else
searchValue.str = children[0].value;
]]>
</body>
</method>
<method name="saveTo">
<parameter name="searchValue"/>
<body>
<![CDATA[
this.internalValue = searchValue;
this.save();
]]>
</body>
</method>
<method name="fillStringsForChildren">
<parameter name="parentNode"/>
<parameter name="bundle"/>
<body>
<![CDATA[
var children = parentNode.childNodes;
var len=children.length;
for (var i=0; i<len; i++) {
var node = children[i];
var stringTag = node.getAttribute("stringTag");
if (stringTag) {
var attr = (node.tagName == "label") ? "value" : "label";
node.setAttribute(attr, bundle.GetStringFromName(stringTag));
}
}
]]>
</body>
</method>
<method name="initialize">
<parameter name="menulist"/>
<parameter name="bundle"/>
<body>
<![CDATA[
this.fillStringsForChildren(menulist.firstChild, bundle);
// to work around bug #78429, set and reset the selectedItem
var item = menulist.selectedItem;
menulist.selectedItem = null;
menulist.selectedItem = item;
]]>
</body>
</method>
<constructor>
<![CDATA[
// initialize strings
var bundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
// intialize the priority picker
this.initialize(document.getAnonymousNodes(this)[1], bundle);
// initialize the status picker
this.initialize(document.getAnonymousNodes(this)[2], bundle);
var datePicker = document.getAnonymousNodes(this)[3];
var searchAttribute = this.searchAttribute;
var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
var time;
if (searchAttribute == nsMsgSearchAttrib.Date)
time = datePicker.value;
else
time = new Date();
datePicker.setAttribute("value",convertDateToString(time));
]]>
</constructor>
</implementation>
<handlers>
<handler event="keypress"><![CDATA[
if (event.keyCode == 13) {
onEnterInSearchTerm();
}
]]></handler>
</handlers>
</binding>
<binding id="searchterm" name="searchTerm" extends="xul:box">
<implementation>
<field name="internalSearchTerm">null</field>
<field name="internalBooleanAnd">null</field>
<!-- the actual nsIMsgSearchTerm object -->
<property name="searchTerm" onget="return this.internalSearchTerm">
<setter>
<![CDATA[
this.internalSearchTerm = val;
var term = val;
// val is a nsIMsgSearchTerm
var searchAttribute=this.searchattribute;
var searchOperator=this.searchoperator;
var searchValue=this.searchvalue;
// now reflect all attributes of the searchterm into the widgets
if (searchAttribute) searchAttribute.value = term.attrib;
if (searchOperator) searchOperator.value = val.op;
if (searchValue) searchValue.value = term.value;
this.booleanAnd = val.booleanAnd;
]]>
</setter>
</property>
<property name="searchScope">
<getter>
<![CDATA[
var searchAttribute = this.searchattribute;
if (searchAttribute)
return searchAttribute.searchScope;
return undefined;
]]>
</getter>
<setter>
<![CDATA[
var searchAttribute = this.searchattribute;
if (searchAttribute) searchAttribute.searchScope=val;
]]>
</setter>
</property>
<!-- the three tags that make up a term - to use, set the
attribute in the XUL to the ID of the term.
-->
<property name="searchattribute"
onget="return document.getElementById(this.getAttribute('searchattribute'));"
onset="this.setAttribute('searchattribute',val.id)"/>
<property name="searchoperator"
onget="return document.getElementById(this.getAttribute('searchoperator'));"
onset="this.setAttribute('searchoperator',val.id)"/>
<property name="searchvalue"
onget="return document.getElementById(this.getAttribute('searchvalue'));"
onset="this.setAttribute('searchvalue',val.id)"/>
<field name="booleanNodes">
<![CDATA[
null;
]]>
</field>
<field name="stringBundle">
<![CDATA[
srGetStrBundle("chrome://messenger/locale/search.properties");
]]>
</field>
<property name="booleanAnd" onget="return this.internalBooleanAnd">
<setter>
<![CDATA[
// whenever you set this, all nodes in booleanNodes
// are updated to reflect the string
if (this.internalBooleanAnd == val) return;
this.internalBooleanAnd = val;
var booleanNodes = this.booleanNodes;
if (!booleanNodes) return;
var stringBundle = this.stringBundle;
var andString = val ? "And" : "Or";
for (var i=0; i<booleanNodes.length; i++) {
try {
var staticString =
stringBundle.GetStringFromName("search" + andString + i);
if (staticString && staticString.length>0)
booleanNodes[i].setAttribute("value", staticString);
} catch (ex) { /* no error, means string not found */}
}
]]>
</setter>
</property>
<method name="save">
<body>
<![CDATA[
var searchTerm = this.searchTerm;
searchTerm.attrib = this.searchattribute.value;
if (this.searchAttribute > nsMsgSearchAttrib.OtherHeader && this.searchAttribute < nsMsgSearchAttrib.kNumMsgSearchAttributes)
searchTerm.arbitraryHeader = this.searchattribute.label;
searchTerm.op = this.searchoperator.value;
if (this.searchvalue.value)
this.searchvalue.save();
else
this.searchvalue.saveTo(searchTerm.value);
searchTerm.value = this.searchvalue.value;
searchTerm.booleanAnd = this.booleanAnd;
]]>
</body>
</method>
<!-- if you have a search term element with no search term -->
<method name="saveTo">
<parameter name="searchTerm"/>
<body>
<![CDATA[
this.internalSearchTerm = searchTerm;
this.save();
]]>
</body>
</method>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -1,599 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributors(s):
* Jan Varga <varga@utcru.sk>
* Håkan Waara (hwaara@chello.se)
*/
//This file stores variables common to mail windows
var messengerContractID = "@mozilla.org/messenger;1";
var statusFeedbackContractID = "@mozilla.org/messenger/statusfeedback;1";
var mailSessionContractID = "@mozilla.org/messenger/services/session;1";
var secureUIContractID = "@mozilla.org/secure_browser_ui;1";
var prefContractID = "@mozilla.org/preferences-service;1";
var msgWindowContractID = "@mozilla.org/messenger/msgwindow;1";
var messenger;
var pref;
var statusFeedback;
var messagePaneController;
var msgWindow;
var msgComposeService;
var accountManager;
var RDF;
var msgComposeType;
var msgComposeFormat;
var mailSession;
var gMessengerBundle;
var gBrandBundle;
var datasourceContractIDPrefix = "@mozilla.org/rdf/datasource;1?name=";
var accountManagerDSContractID = datasourceContractIDPrefix + "msgaccountmanager";
var folderDSContractID = datasourceContractIDPrefix + "mailnewsfolders";
var accountManagerDataSource;
var folderDataSource;
var messagesBox = null;
var accountCentralBox = null;
var gSearchBox = null;
var gAccountCentralLoaded = false;
var gFakeAccountPageLoaded = false;
var gPaneConfig = null;
//End progress and Status variables
// for checking if the folder loaded is Draft or Unsent which msg is editable
var gIsEditableMsgFolder = false;
var gOfflineManager;
// cache the last keywords
var gLastKeywords = "";
function OnMailWindowUnload()
{
RemoveMailOfflineObserver();
var searchSession = GetSearchSession();
if (searchSession)
removeGlobalListeners();
var dbview = GetDBView();
if (dbview) {
dbview.close();
}
var mailSession = Components.classes[mailSessionContractID].getService();
if(mailSession)
{
mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession);
if(mailSession)
{
mailSession.RemoveFolderListener(folderListener);
}
}
mailSession.RemoveMsgWindow(msgWindow);
messenger.SetWindow(null, null);
var msgDS = folderDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
msgDS.window = null;
msgDS = accountManagerDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
msgDS.window = null;
msgWindow.closeWindow();
}
function CreateMailWindowGlobals()
{
// get the messenger instance
messenger = Components.classes[messengerContractID].createInstance();
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
pref = Components.classes[prefContractID].getService(Components.interfaces.nsIPrefBranch);
//Create windows status feedback
// set the JS implementation of status feedback before creating the c++ one..
window.MsgStatusFeedback = new nsMsgStatusFeedback();
// double register the status feedback object as the xul browser window implementation
window.XULBrowserWindow = window.MsgStatusFeedback;
statusFeedback = Components.classes[statusFeedbackContractID].createInstance();
statusFeedback = statusFeedback.QueryInterface(Components.interfaces.nsIMsgStatusFeedback);
/*
not in use unless we want the lock button back
// try to create and register ourselves with a security icon...
var securityIcon = document.getElementById("security-button");
if (securityIcon) {
// if the client isn't built with psm enabled then we won't have a secure UI to monitor the lock icon
// so be sure to wrap this in a try / catch clause...
try {
var secureUI;
// we may not have a secure UI if psm isn't installed!
if (secureUIContractID in Components.classes) {
secureUI = Components.classes[secureUIContractID].createInstance();
if (secureUI) {
secureUI = secureUI.QueryInterface(Components.interfaces.nsISecureBrowserUI);
secureUI.init(_content, securityIcon);
}
}
}
catch (ex) {}
}
*/
window.MsgWindowCommands = new nsMsgWindowCommands();
//Create message window object
msgWindow = Components.classes[msgWindowContractID].createInstance();
msgWindow = msgWindow.QueryInterface(Components.interfaces.nsIMsgWindow);
msgComposeService = Components.classes['@mozilla.org/messengercompose;1'].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
mailSession = Components.classes["@mozilla.org/messenger/services/session;1"].getService(Components.interfaces.nsIMsgMailSession);
accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService();
RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
msgComposeType = Components.interfaces.nsIMsgCompType;
msgComposeFormat = Components.interfaces.nsIMsgCompFormat;
gMessengerBundle = document.getElementById("bundle_messenger");
gBrandBundle = document.getElementById("bundle_brand");
//Create datasources
accountManagerDataSource = Components.classes[accountManagerDSContractID].createInstance();
folderDataSource = Components.classes[folderDSContractID].createInstance();
messagesBox = document.getElementById("messagesBox");
accountCentralBox = document.getElementById("accountCentralBox");
gSearchBox = document.getElementById("searchBox");
gPaneConfig = pref.getIntPref("mail.pane_config");
}
function InitMsgWindow()
{
msgWindow.messagePaneController = new nsMessagePaneController();
msgWindow.statusFeedback = statusFeedback;
msgWindow.msgHeaderSink = messageHeaderSink;
msgWindow.SetDOMWindow(window);
mailSession.AddMsgWindow(msgWindow);
}
function AddDataSources()
{
accountManagerDataSource = accountManagerDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource);
folderDataSource = folderDataSource.QueryInterface(Components.interfaces.nsIRDFDataSource);
//to move menu item
SetupMoveCopyMenus('moveMenu', accountManagerDataSource, folderDataSource);
//to copy menu item
SetupMoveCopyMenus('copyMenu', accountManagerDataSource, folderDataSource);
//To FileButton menu
SetupMoveCopyMenus('button-file', accountManagerDataSource, folderDataSource);
//To move and copy menus in message pane context
SetupMoveCopyMenus("messagePaneContext-copyMenu", accountManagerDataSource, folderDataSource);
SetupMoveCopyMenus("messagePaneContext-moveMenu", accountManagerDataSource, folderDataSource);
//Add statusFeedback
var msgDS = folderDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
msgDS.window = msgWindow;
msgDS = accountManagerDataSource.QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
msgDS.window = msgWindow;
}
function SetupMoveCopyMenus(menuid, accountManagerDataSource, folderDataSource)
{
var menu = document.getElementById(menuid);
if(menu)
{
menu.database.AddDataSource(accountManagerDataSource);
menu.database.AddDataSource(folderDataSource);
menu.setAttribute('ref', 'msgaccounts:/');
}
}
function dumpProgress() {
var broadcaster = document.getElementById("Messenger:LoadingProgress");
dump( "broadcaster mode=" + broadcaster.getAttribute("mode") + "\n" );
dump( "broadcaster value=" + broadcaster.getAttribute("value") + "\n" );
dump( "meter mode=" + meter.getAttribute("mode") + "\n" );
dump( "meter value=" + meter.getAttribute("value") + "\n" );
}
// We're going to implement our status feedback for the mail window in JS now.
// the following contains the implementation of our status feedback object
function nsMsgStatusFeedback()
{
}
nsMsgStatusFeedback.prototype =
{
// global variables for status / feedback information....
statusTextFld : null,
statusBar : null,
throbber : null,
stopCmd : null,
startTimeoutID : null,
stopTimeoutID : null,
pendingStartRequests : 0,
meteorsSpinning : false,
ensureStatusFields : function()
{
if (!this.statusTextFld ) this.statusTextFld = document.getElementById("statusText");
if (!this.statusBar) this.statusBar = document.getElementById("statusbar-icon");
if(!this.throbber) this.throbber = document.getElementById("navigator-throbber");
if(!this.stopCmd) this.stopCmd = document.getElementById("cmd_stop");
},
// nsIXULBrowserWindow implementation
setJSStatus : function(status)
{
},
setJSDefaultStatus : function(status)
{
},
setOverLink : function(link)
{
this.showStatusString(link);
},
QueryInterface : function(iid)
{
if (iid.equals(Components.interfaces.nsIMsgStatusFeedback) ||
iid.equals(Components.interfaces.nsIXULBrowserWindow))
return this;
throw Components.results.NS_NOINTERFACE;
},
// nsIMsgStatusFeedback implementation.
showStatusString : function(statusText)
{
this.ensureStatusFields();
if ( statusText == "" )
statusText = defaultStatus;
this.statusTextFld.label = statusText;
},
_startMeteors : function()
{
this.ensureStatusFields();
this.meteorsSpinning = true;
this.startTimeoutID = null;
// Turn progress meter on.
this.statusBar.setAttribute("mode","undetermined");
// turn throbber on
this.throbber.setAttribute("busy", true);
//turn on stop button and menu
this.stopCmd.removeAttribute("disabled");
},
startMeteors : function()
{
this.pendingStartRequests++;
// if we don't already have a start meteor timeout pending
// and the meteors aren't spinning, then kick off a start
if (!this.startTimeoutID && !this.meteorsSpinning)
this.startTimeoutID = setTimeout('window.MsgStatusFeedback._startMeteors();', 500);
// since we are going to start up the throbber no sense in processing
// a stop timeout...
if (this.stopTimeoutID)
{
clearTimeout(this.stopTimeoutID);
this.stopTimeoutID = null;
}
},
_stopMeteors : function()
{
if(gTimelineEnabled){
gTimelineService.stopTimer("FolderLoading");
gTimelineService.markTimer("FolderLoading");
gTimelineService.resetTimer("FolderLoading");
}
this.ensureStatusFields();
var msg = gMessengerBundle.getString("documentDone");
this.showStatusString(msg);
defaultStatus = msg;
this.throbber.setAttribute("busy", false);
// Turn progress meter off.
this.statusBar.setAttribute("mode","normal");
this.statusBar.value = 0; // be sure to clear the progress bar
this.statusBar.label = "";
this.stopCmd.setAttribute("disabled", "true");
this.meteorsSpinning = false;
this.stopTimeoutID = null;
},
stopMeteors : function()
{
if (this.pendingStartRequests > 0)
this.pendingStartRequests--;
// if we are going to be starting the meteors, cancel the start
if (this.pendingStartRequests == 0 && this.startTimeoutID)
{
clearTimeout(this.startTimeoutID);
this.startTimeoutID = null;
}
// if we have no more pending starts and we don't have a stop timeout already in progress
// AND the meteors are currently running then fire a stop timeout to shut them down.
if (this.pendingStartRequests == 0 && !this.stopTimeoutID)
{
if (this.meteorsSpinning)
this.stopTimeoutID = setTimeout('window.MsgStatusFeedback._stopMeteors();', 500);
}
},
showProgress : function(percentage)
{
this.ensureStatusFields();
if (percentage >= 0)
{
this.statusBar.setAttribute("mode", "normal");
this.statusBar.value = percentage;
this.statusBar.label = Math.round(percentage) + "%";
}
},
closeWindow : function(percent)
{
}
}
function nsMsgWindowCommands()
{
}
nsMsgWindowCommands.prototype =
{
QueryInterface : function(iid)
{
if(iid.equals(Components.interfaces.nsIMsgWindowCommands))
return this;
throw Components.results.NS_NOINTERFACE;
return null;
},
SelectFolder: function(folderUri)
{
SelectFolder(folderUri);
},
SelectMessage: function(messageUri)
{
SelectMessage(messageUri);
}
}
function nsMessagePaneController()
{
}
nsMessagePaneController.prototype =
{
QueryInterface : function(iid)
{
if(iid.equals(Components.interfaces.nsIMsgMessagePaneController))
return this;
throw Components.results.NS_NOINTERFACE;
return null;
},
clearMsgPane: function()
{
if (gDBView)
setTitleFromFolder(gDBView.msgFolder,null);
else
setTitleFromFolder(null,null);
ClearMessagePane();
}
}
function StopUrls()
{
msgWindow.StopUrls();
}
function loadStartPage() {
try {
var startpageenabled = pref.getBoolPref("mailnews.start_page.enabled");
if (startpageenabled) {
var startpage = pref.getComplexValue("mailnews.start_page.url",
Components.interfaces.nsIPrefLocalizedString).data;
if (startpage != "") {
// first, clear out the charset setting.
messenger.setDisplayCharset("");
GetMessagePaneFrame().location = startpage;
//dump("start message pane with: " + startpage + "\n");
ClearMessageSelection();
}
}
}
catch (ex) {
dump("Error loading start page.\n");
return;
}
}
// Display AccountCentral page when users clicks on the Account Folder.
// When AccountCentral page need to be shown, we need to hide
// the box containing threadPane, splitter and messagePane.
// Load iframe in the AccountCentral box with corresponding page
function ShowAccountCentral()
{
try
{
var acctCentralPage = pref.getComplexValue("mailnews.account_central_page.url",
Components.interfaces.nsIPrefLocalizedString).data;
switch (gPaneConfig)
{
case 0:
messagesBox.setAttribute("collapsed", "true");
gSearchBox.setAttribute("collapsed", "true");
accountCentralBox.removeAttribute("collapsed");
window.frames["accountCentralPane"].location = acctCentralPage;
gAccountCentralLoaded = true;
break;
case 1:
var messagePaneBox = document.getElementById("messagepanebox");
messagePaneBox.setAttribute("collapsed", "true");
var searchAndThreadPaneBox = document.getElementById("searchAndthreadpaneBox");
searchAndThreadPaneBox.setAttribute("collapsed", "true");
var threadPaneSplitter = document.getElementById("threadpane-splitter");
threadPaneSplitter.setAttribute("collapsed", "true");
accountCentralBox.removeAttribute("collapsed");
window.frames["accountCentralPane"].location = acctCentralPage;
gAccountCentralLoaded = true;
break;
}
}
catch (ex)
{
dump("Error loading AccountCentral page -> " + ex + "\n");
return;
}
}
// Display thread and message panes with splitter when user tries
// to read messages by clicking on msgfolders. Hide AccountCentral
// box and display message box.
function HideAccountCentral()
{
try
{
switch (gPaneConfig)
{
case 0:
window.frames["accountCentralPane"].location = "about:blank";
accountCentralBox.setAttribute("collapsed", "true");
gSearchBox.removeAttribute("collapsed");
messagesBox.removeAttribute("collapsed");
gAccountCentralLoaded = false;
break;
case 1:
window.frames["accountCentralPane"].location = "about:blank";
accountCentralBox.setAttribute("collapsed", "true");
var messagePaneBox = document.getElementById("messagepanebox");
messagePaneBox.removeAttribute("collapsed");
var searchAndThreadPaneBox = document.getElementById("searchAndthreadpaneBox");
searchAndThreadPaneBox.removeAttribute("collapsed");
var threadPaneSplitter = document.getElementById("threadpane-splitter");
threadPaneSplitter.removeAttribute("collapsed");
gAccountCentralLoaded = false;
break;
}
}
catch (ex)
{
dump("Error hiding AccountCentral page -> " + ex + "\n");
return;
}
}
// Given the server, open the twisty and the set the selection
// on inbox of that server.
// prompt if offline.
function OpenInboxForServer(server)
{
try {
HideAccountCentral();
var inboxFolder = GetInboxFolder(server);
SelectFolder(inboxFolder.URI);
if(CheckOnline())
GetMessagesForInboxOnServer(server);
else {
var option = PromptGetMessagesOffline();
if(option == 0) {
if (!gOfflineManager)
GetOfflineMgrService();
gOfflineManager.goOnline(false /* sendUnsentMessages */,
false /* playbackOfflineImapOperations */,
msgWindow);
GetMessagesForInboxOnServer(server);
}
}
}
catch (ex) {
dump("Error opening inbox for server -> " + ex + "\n");
return;
}
}
function GetSearchSession()
{
if (("gSearchSession" in top) && gSearchSession)
return gSearchSession;
else
return null;
}
function SetKeywords(aKeywords)
{
// we cache the last keywords.
// if there is no chagne, we do nothing.
// most of the time, this will be the case.
if (aKeywords == gLastKeywords)
return;
// these are the UI elements who care about keywords
var ids = ["expandedKeywordImage","expandedHeaderView","msgHeaderView","collapsedHeaderView","collapsedKeywordImage","editMessageBox","expandedAttachmentBox"];
for (i in ids) {
var element = document.getElementById(ids[i]);
if (element) {
if (aKeywords)
element.setAttribute("class", aKeywords);
else {
// if no keywords, reset class to the original class
element.setAttribute("class", element.getAttribute("originalclass"));
}
}
}
// cache the keywords
gLastKeywords = aKeywords;
}

Просмотреть файл

@ -31,12 +31,9 @@ var gOfflinePromptsBundle;
var nsPrefBranch = null;
var gOfflineManager;
var gWindowManagerInterface;
var gPrefs = null;
var gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var gPrintSettings = null;
var gTimelineEnabled = false;
/*
var gTimelineService = null;
var gTimelineEnabled = ("@mozilla.org;timeline-service;1" in Components.classes);
if (gTimelineEnabled) {
@ -52,7 +49,6 @@ if (gTimelineEnabled) {
gTimelineEnabled = false;
}
}
*/
var disallow_classes_no_html = 1; /* the user preference,
if HTML is not allowed. I assume, that the user could have set this to a
@ -78,29 +74,18 @@ function menu_new_init()
newAccountItem.setAttribute("disabled","true");
// Change "New Folder..." menu according to the context
var startIndex = {};
var endIndex = {};
var folderTree = GetFolderTree();
folderTree.treeBoxObject.selection.getRangeAt(0, startIndex, endIndex);
if (startIndex.value < 0)
return false;
var numSelected = endIndex.value - startIndex.value + 1;
var folderResource = GetFolderResource(folderTree, startIndex.value);
var specialFolder = GetFolderAttribute(folderTree, folderResource,
"SpecialFolder");
var isServer = GetFolderAttribute(folderTree, folderResource,
"IsServer") == 'true';
var serverType = GetFolderAttribute(folderTree, folderResource,
"ServerType");
var canCreateNew = GetFolderAttribute(folderTree, folderResource,
"CanCreateSubfolders") == "true";
var isInbox = specialFolder == "Inbox";
var isIMAPFolder = GetFolderAttribute(folderTree, folderResource,
"ServerType") == "imap";
var folderArray = GetSelectedMsgFolders();
if (folderArray.length == 0)
return;
var msgFolder = folderArray[0];
var isServer = msgFolder.isServer;
var serverType = msgFolder.server.type;
var canCreateNew = msgFolder.canCreateSubfolders;
var isInbox = IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_INBOX);
var isIMAPFolder = serverType == "imap";
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var showNew = ((numSelected <=1) && (serverType != 'nntp') &&
canCreateNew) || isInbox;
var showNew = ((serverType != 'nntp') && canCreateNew) || isInbox;
ShowMenuItem("menu_newFolder", showNew);
EnableMenuItem("menu_newFolder", !isIMAPFolder || !ioService.offline);
if (showNew)
@ -212,6 +197,7 @@ function InitViewSortByMenu()
setSortByMenuItemCheckState("sortByThreadMenuitem", (sortType == nsMsgViewSortType.byThread));
setSortByMenuItemCheckState("sortByUnreadMenuitem", (sortType == nsMsgViewSortType.byUnread));
setSortByMenuItemCheckState("sortByLabelMenuitem", (sortType == nsMsgViewSortType.byLabel));
setSortByMenuItemCheckState("sortByScoreMenuitem", (sortType == nsMsgViewSortType.byScore));
// the Sender / Recipient menu is dynamic
setSortByMenuItemCheckState("sortBySenderOrRecipientMenuitem", (sortType == nsMsgViewSortType.byAuthor) || (sortType == nsMsgViewSortType.byRecipient));
@ -547,6 +533,19 @@ function SelectedMessagesAreDeleted()
}
}
function SelectedMessagesAreJunk()
{
var isJunk;
try {
var score = gDBView.hdrForFirstSelectedMessage.getStringProperty("score");
isJunk = ((score != "") && (score != "0"));
}
catch (ex) {
isJunk = false;
}
return isJunk;
}
function SelectedMessagesAreRead()
{
var isRead;
@ -866,8 +865,6 @@ function MsgReplyToAllMessage(event)
function MsgForwardMessage(event)
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var forwardType = 0;
try {
forwardType = gPrefs.getIntPref("mail.forward_message_mode");
@ -1124,6 +1121,11 @@ function CloseMailWindow()
window.close();
}
function MsgJunk()
{
JunkSelectedMessages(!SelectedMessagesAreJunk());
}
function MsgMarkMsgAsRead(markRead)
{
if (!markRead) {
@ -1178,10 +1180,10 @@ function MsgFind()
findInPage(getMessageBrowser(), contentWindow, contentWindow)
}
function MsgFindAgain()
function MsgFindAgain(reverse)
{
var contentWindow = window.top._content;
findAgainInPage(getMessageBrowser(), contentWindow, contentWindow)
findAgainInPage(getMessageBrowser(), contentWindow, contentWindow, reverse)
}
function MsgCanFindAgain()
@ -1195,7 +1197,8 @@ function MsgFilters(emailAddress)
var args;
if (emailAddress)
{
/* we have to do prefill filter so we are going to launch the filterEditor dialog
/* we have to do prefill filter so we are going to
launch the filterEditor dialog
and prefill that with the emailAddress */
var curFilterList = preselectedFolder.getFilterList(msgWindow);
@ -1204,28 +1207,56 @@ function MsgFilters(emailAddress)
window.openDialog("chrome://messenger/content/FilterEditor.xul", "",
"chrome, modal, resizable,centerscreen,dialog=yes", args);
/* if the user hits ok in the filterEditor dialog we set args.refresh=true there
/* if the user hits ok in the filterEditor dialog we set
args.refresh=true there
we check this here in args to show filterList dialog */
if ("refresh" in args && args.refresh)
{
args = { folder: preselectedFolder };
window.openDialog("chrome://messenger/content/FilterListDialog.xul", "",
"chrome,modal,resizable,centerscreen,dialog=yes", args);
args = { refresh: true, folder: preselectedFolder };
MsgFilterList(args);
}
}
else //just launch filterList dialog
else // just launch filterList dialog
{
args = { folder: preselectedFolder };
window.openDialog("chrome://messenger/content/FilterListDialog.xul", "",
"chrome,modal,resizable,centerscreen,dialog=yes", args);
args = { refresh: false, folder: preselectedFolder };
MsgFilterList(args);
}
}
function MsgApplyFilters()
{
var filterService = Components.classes["@mozilla.org/messenger/services/filters;1"].getService(Components.interfaces.nsIMsgFilterService);
var preselectedFolder = GetFirstSelectedMsgFolder();
var selectedFolders = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
selectedFolders.AppendElement(preselectedFolder);
var curFilterList = preselectedFolder.getFilterList(msgWindow);
// create a new filter list and copy over the enabled filters to it.
// We do this instead of having the filter after the fact code ignore
// disabled filters because the Filter Dialog filter after the fact
// code would have to clone filters to allow disabled filters to run,
// and we don't support cloning filters currently.
var tempFilterList = filterService.getTempFilterList(preselectedFolder);
var numFilters = curFilterList.filterCount;
// make sure the temp filter list uses the same log stream
tempFilterList.logStream = curFilterList.logStream;
tempFilterList.loggingEnabled = curFilterList.loggingEnabled;
var newFilterIndex = 0;
for (var i = 0; i < numFilters; i++)
{
var curFilter = curFilterList.getFilterAt(i);
if (curFilter.enabled)
{
tempFilterList.insertFilterAt(newFilterIndex, curFilter);
newFilterIndex++;
}
}
filterService.applyFiltersToFolders(tempFilterList, selectedFolders, msgWindow);
}
function MsgViewAllHeaders()
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setIntPref("mail.show_headers",2);
MsgReload();
return true;
@ -1233,8 +1264,6 @@ function MsgViewAllHeaders()
function MsgViewNormalHeaders()
{
if (!gPrefs)
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setIntPref("mail.show_headers",1);
MsgReload();
return true;
@ -1242,8 +1271,6 @@ function MsgViewNormalHeaders()
function MsgViewBriefHeaders()
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setIntPref("mail.show_headers",0);
MsgReload();
return true;
@ -1251,8 +1278,6 @@ function MsgViewBriefHeaders()
function MsgBodyAllowHTML()
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setBoolPref("mailnews.display.prefer_plaintext", false);
gPrefs.setIntPref("mailnews.display.html_as", 0);
gPrefs.setIntPref("mailnews.display.disallow_mime_handlers", 0);
@ -1262,8 +1287,6 @@ function MsgBodyAllowHTML()
function MsgBodySanitized()
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setBoolPref("mailnews.display.prefer_plaintext", false);
gPrefs.setIntPref("mailnews.display.html_as", 3);
gPrefs.setIntPref("mailnews.display.disallow_mime_handlers",
@ -1274,8 +1297,6 @@ function MsgBodySanitized()
function MsgBodyAsPlaintext()
{
if (!gPrefs)
gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
gPrefs.setBoolPref("mailnews.display.prefer_plaintext", true);
gPrefs.setIntPref("mailnews.display.html_as", 1);
gPrefs.setIntPref("mailnews.display.disallow_mime_handlers",
@ -1792,347 +1813,46 @@ function OnMsgLoaded(folder, msgURI)
function MsgSearchMessages()
{
var preselectedFolder = null;
if ("GetFirstSelectedMsgFolder" in window)
preselectedFolder = GetFirstSelectedMsgFolder();
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var searchWindow = windowManagerInterface.getMostRecentWindow("mailnews:search");
var preselectedFolder = null;
if ("GetFirstSelectedMsgFolder" in window)
preselectedFolder = GetFirstSelectedMsgFolder();
if (searchWindow)
searchWindow.focus();
else
window.openDialog("chrome://messenger/content/SearchDialog.xul", "",
"chrome,resizable,status,centerscreen,dialog=no", { folder: preselectedFolder });
var args = { folder: preselectedFolder };
OpenOrFocusWindow(args, "mailnews:search", "chrome://messenger/content/SearchDialog.xul");
}
function MsgJunkMail()
{
var preselectedFolder = null;
if ("GetFirstSelectedMsgFolder" in window)
preselectedFolder = GetFirstSelectedMsgFolder();
var args = { folder: preselectedFolder };
OpenOrFocusWindow(args, "mailnews:junk", "chrome://messenger/content/junkMail.xul");
}
function MsgSearchAddresses()
{
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var abSearchWindow = windowManagerInterface.getMostRecentWindow("mailnews:absearch");
if (abSearchWindow)
abSearchWindow.focus();
else
window.openDialog("chrome://messenger/content/ABSearchDialog.xul", "",
"chrome,resizable,status,centerscreen,dialog=no", {directory: null});
var args = { directory: null };
OpenOrFocusWindow(args, "mailnews:absearch", "chrome://messenger/content/ABSearchDialog.xul");
}
function MsgFilterList(args)
{
OpenOrFocusWindow(args, "mailnews:filterlist", "chrome://messenger/content/FilterListDialog.xul");
}
var gLastMessageUriToLoad = null;
var gThreadPaneCommandUpdater = null;
function ThreadPaneOnClick(event)
function OpenOrFocusWindow(args, windowType, chromeURL)
{
// we only care about button 0 (left click) events
if (event.button != 0) return;
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
var desiredWindow = windowManager.getMostRecentWindow(windowType);
// we are already handling marking as read and flagging
// in nsMsgDBView.cpp
// so all we need to worry about here is double clicks
// and column header.
//
// we get in here for clicks on the "treecol" (headers)
// and the "scrollbarbutton" (scrollbar buttons)
// we don't want those events to cause a "double click"
var t = event.originalTarget;
if (t.localName == "treecol") {
HandleColumnClick(t.id);
}
else if (event.detail == 2 && t.localName == "treechildren") {
var row = new Object;
var colID = new Object;
var childElt = new Object;
var tree = GetThreadTree();
// figure out what cell the click was in
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, colID, childElt);
if (row.value == -1)
return;
// if the cell is in a "cycler" column
// or if the user double clicked on the twisty,
// don't open the message in a new window
var col = document.getElementById(colID.value);
if (col && col.getAttribute("cycler") != "true" && (childElt.value != "twisty")) {
ThreadPaneDoubleClick();
// double clicking should not toggle the open / close state of the
// thread. this will happen if we don't prevent the event from
// bubbling to the default handler in tree.xml
event.preventBubble();
}
}
}
function nsMsgDBViewCommandUpdater()
{}
nsMsgDBViewCommandUpdater.prototype =
{
updateCommandStatus : function()
{
// the back end is smart and is only telling us to update command status
// when the # of items in the selection has actually changed.
UpdateMailToolbar("dbview driven, thread pane");
},
displayMessageChanged : function(aFolder, aSubject, aKeywords)
{
setTitleFromFolder(aFolder, aSubject);
gHaveLoadedMessage = true;
SetKeywords(aKeywords);
},
QueryInterface : function(iid)
{
if(iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater))
return this;
throw Components.results.NS_NOINTERFACE;
return null;
}
}
function HandleColumnClick(columnID)
{
var sortType = ConvertColumnIDToSortType(columnID);
// if sortType is 0, this is an unsupported sort type
// return, since we can't sort by that column.
if (sortType == 0) {
return;
}
var dbview = GetDBView();
if (sortType == nsMsgViewSortType.byThread)
{ //do not allow sorting by thread in search view.
if (dbview && dbview.isSearchView) return;
}
if (dbview.sortType == sortType) {
MsgReverseSortThreadPane();
}
else {
MsgSortThreadPane(sortType);
if (desiredWindow) {
desiredWindow.focus();
if ("refresh" in args && args.refresh)
desiredWindow.refresh();
}
}
function MsgComposeDraftMessage()
{
var loadedFolder = GetLoadedMsgFolder();
var messageArray = GetSelectedMessages();
ComposeMessage(msgComposeType.Draft, msgComposeFormat.Default, loadedFolder, messageArray);
}
function ThreadPaneDoubleClick()
{
if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_DRAFTS)) {
MsgComposeDraftMessage();
}
else if(IsSpecialFolderSelected(MSG_FOLDER_FLAG_TEMPLATES)) {
var loadedFolder = GetLoadedMsgFolder();
var messageArray = GetSelectedMessages();
ComposeMessage(msgComposeType.Template, msgComposeFormat.Default, loadedFolder, messageArray);
}
else {
MsgOpenSelectedMessages();
}
}
function ThreadPaneKeyPress(event)
{
if (event.keyCode == 13)
ThreadPaneDoubleClick();
}
function MsgSortByDate()
{
MsgSortThreadPane(nsMsgViewSortType.byDate);
}
function MsgSortBySenderOrRecipient()
{
if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) {
MsgSortThreadPane(nsMsgViewSortType.byRecipient);
}
else {
MsgSortThreadPane(nsMsgViewSortType.byAuthor);
}
}
function MsgSortByStatus()
{
MsgSortThreadPane(nsMsgViewSortType.byStatus);
}
function MsgSortByLabel()
{
MsgSortThreadPane(nsMsgViewSortType.byLabel);
}
function MsgSortBySubject()
{
MsgSortThreadPane(nsMsgViewSortType.bySubject);
}
function MsgSortByLocation()
{
MsgSortThreadPane(nsMsgViewSortType.byLocation);
}
function MsgSortByFlagged()
{
MsgSortThreadPane(nsMsgViewSortType.byFlagged);
}
function MsgSortByPriority()
{
MsgSortThreadPane(nsMsgViewSortType.byPriority);
}
function MsgSortBySize()
{
MsgSortThreadPane(nsMsgViewSortType.bySize);
}
function MsgSortByUnread()
{
MsgSortThreadPane(nsMsgViewSortType.byUnread);
}
function MsgSortByOrderReceived()
{
MsgSortThreadPane(nsMsgViewSortType.byId);
}
function MsgSortByTotal()
{
dump("XXX fix MsgSortByTotal\n");
//MsgSortThreadPane(nsMsgViewSortType.byTotal);
}
function MsgSortByThread()
{
var dbview = GetDBView();
if(dbview && dbview.isSearchView) //do not allow sorting by thread in search view.
return;
MsgSortThreadPane(nsMsgViewSortType.byThread);
}
function MsgSortThreadPane(sortType)
{
var dbview = GetDBView();
dbview.sort(sortType, nsMsgViewSortOrder.ascending);
UpdateSortIndicators(sortType, nsMsgViewSortOrder.ascending);
}
function MsgReverseSortThreadPane()
{
var dbview = GetDBView();
if (dbview.sortOrder == nsMsgViewSortOrder.ascending) {
MsgSortDescending();
}
else {
MsgSortAscending();
}
}
function MsgSortAscending()
{
var dbview = GetDBView();
dbview.sort(dbview.sortType, nsMsgViewSortOrder.ascending);
UpdateSortIndicators(dbview.sortType, nsMsgViewSortOrder.ascending);
}
function MsgSortDescending()
{
var dbview = GetDBView();
dbview.sort(dbview.sortType, nsMsgViewSortOrder.descending);
UpdateSortIndicators(dbview.sortType, nsMsgViewSortOrder.descending);
}
function UpdateSortIndicators(sortType, sortOrder)
{
var colID = ConvertSortTypeToColumnID(sortType);
var sortedColumn;
// set the sort indicator on the column we are sorted by
if (colID) {
sortedColumn = document.getElementById(colID);
if (sortedColumn) {
if (sortOrder == nsMsgViewSortOrder.ascending) {
sortedColumn.setAttribute("sortDirection","ascending");
}
else {
sortedColumn.setAttribute("sortDirection","descending");
}
// remove the sort indicator from all the columns
// except the one we are sorted by
var currCol = sortedColumn.parentNode.firstChild;
while (currCol) {
if (currCol != sortedColumn && currCol.localName == "treecol")
currCol.removeAttribute("sortDirection");
currCol = currCol.nextSibling;
}
}
}
}
function IsSpecialFolderSelected(flags)
{
var selectedFolder = GetThreadPaneFolder();
return IsSpecialFolder(selectedFolder, flags);
}
function GetThreadTree()
{
if (gThreadTree) return gThreadTree;
gThreadTree = document.getElementById('threadTree');
return gThreadTree;
}
function GetThreadPaneFolder()
{
try {
return gDBView.msgFolder;
}
catch (ex) {
return null;
}
}
function EnsureRowInThreadTreeIsVisible(index)
{
if (index < 0)
return;
var tree = GetThreadTree();
tree.treeBoxObject.ensureRowIsVisible(index);
}
function ThreadPaneOnLoad()
{
var tree = GetThreadTree();
tree.addEventListener("click",ThreadPaneOnClick,true);
// The mousedown event listener below should only be added in the thread
// pane of the mailnews 3pane window, not in the advanced search window.
if(tree.parentNode.id == "searchResultListBox")
return;
tree.addEventListener("mousedown",TreeOnMouseDown,true);
}
function ThreadPaneSelectionChanged()
{
var treeBoxObj = GetThreadTree().treeBoxObject;
var treeSelection = treeBoxObj.selection;
if (!gRightMouseButtonDown)
treeBoxObj.view.selectionChanged();
else
window.openDialog(chromeURL, "", "chrome,resizable,status,centerscreen,dialog=no", args);
}

Просмотреть файл

@ -127,11 +127,12 @@ Rights Reserved.
<command id="cmd_sortByThread" oncommand="goDoCommand('cmd_sortByThread')" disabled="true"/>
<commandset id="viewZoomCommands"/>
</commandset>
<command id="cmd_newMessage" oncommand="MsgNewMessage(null);"/>
<commandset id="mailEditMenuItems"
commandupdater="true"
events="create-menu-edit"
oncommandupdate="goUpdateMailMenuItems(this)">
<command id="cmd_undo"
valueDeleteMsg="&undoDeleteMsgCmd.label;"
valueMoveMsg="&undoMoveMsgCmd.label;"
@ -171,6 +172,7 @@ Rights Reserved.
valueGeneric="&folderPropsCmd.label;"/>
<command id="cmd_find" oncommand="goDoCommand('cmd_find')" disabled="true"/>
<command id="cmd_findAgain" oncommand="goDoCommand('cmd_findAgain')" disabled="true"/>
<command id="cmd_findPrev" oncommand="goDoCommand('cmd_findPrev')" disabled="true"/>
<command id="cmd_stop" oncommand="MsgStop();"/>
</commandset>
@ -227,6 +229,7 @@ Rights Reserved.
<command id="button_next"/>
<command id="button_file"/>
<command id="cmd_delete"/>
<command id="button_junk"/>
</commandset>
@ -264,7 +267,9 @@ Rights Reserved.
<command id="cmd_label5" oncommand="goDoCommand('cmd_label5');" disabled="true"/>
</commandset>
<commandset id="tasksCommands">
<command id="cmd_searchMsgs" oncommand="MsgSearchMessages();"/>
</commandset>
<keyset id="mailKeys">
<key id="space" key=" " oncommand="SpaceHit()"/>
@ -312,9 +317,12 @@ Rights Reserved.
modifiers="accel, shift"/>
<key id="key_find" key="&findCmd.key;" oncommand="goDoCommand('cmd_find')" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.key;" oncommand="goDoCommand('cmd_findAgain')" modifiers="accel"/>
<key id="key_findPrev" key="&findPrevCmd.key;" oncommand="goDoCommand('cmd_findPrev')" modifiers="accel, shift"/>
<key keycode="&findAgainCmd.key2;" oncommand="goDoCommand('cmd_findAgain')"/>
<key keycode="&findPrevCmd.key2;" oncommand="goDoCommand('cmd_findPrev')" modifiers="shift"/>
<key id="key_stop" keycode="VK_ESCAPE" command="cmd_stop"/>
<keyset id="viewZoomKeys"/>
<key id="key_newMessage" key="&newMessageCmd.key;" command="cmd_newMessage" modifiers="accel"/>
<!-- Tab/F6 Keys -->
<key keycode="VK_TAB" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/>
<key keycode="VK_TAB" oncommand="SwitchPaneFocus(event);" modifiers="control"/>
@ -900,13 +908,16 @@ Rights Reserved.
<menuitem label="&newNewMsgCmd.label;"
accesskey="&newNewMsgCmd.accesskey;"
key="key_newMessage"
command="cmd_newMessage"/>
oncommand="MsgNewMessage(null);"/>
<menuitem id="menu_newFolder" label="&newFolderCmd.label;"
oncommand="MsgNewFolder(NewFolder);"
accesskey="&newFolderCmd.accesskey;"/>
<menuitem id="newAccountMenuItem" label="&newAccountCmd.label;"
accesskey="&newAccountCmd.accesskey;"
oncommand="MsgAccountWizard();"/>
<menuseparator/>
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newEditor"/>
</menupopup>
</menu>
<menuitem id="openMessageWindowMenuitem" label="&openMessageWindowCmd.label;"
@ -1019,6 +1030,7 @@ Rights Reserved.
<menuseparator/>
<menuitem label="&findCmd.label;" key="key_find" accesskey="&findCmd.accesskey;" observes="cmd_find"/>
<menuitem label="&findAgainCmd.label;" key="key_findAgain" accesskey="&findAgainCmd.accesskey;" observes="cmd_findAgain"/>
<menuitem label="&findPrevCmd.label;" key="key_findPrev" accesskey="&findPrevCmd.accesskey;" observes="cmd_findPrev"/>
<menuseparator/>
<menuitem id="menu_properties" label="&folderPropsCmd.label;"
accesskey="&folderPropsCmd.accesskey;"
@ -1068,6 +1080,9 @@ Rights Reserved.
<menuitem id="sortByThreadMenuitem" type="radio" name="sortby" label="&sortByThreadCmd.label;" accesskey="&sortByThreadCmd.accesskey;" oncommand="MsgSortByThread()"/>
<menuitem id="sortByUnreadMenuitem" type="radio" name="sortby" label="&sortByUnreadCmd.label;" accesskey="&sortByUnreadCmd.accesskey;" oncommand="MsgSortByUnread()"/>
<menuitem id="sortByLabelMenuitem" type="radio" name="sortby" label="&sortByLabelCmd.label;" accesskey="&sortByLabelCmd.accesskey;" oncommand="MsgSortByLabel()"/>
<!-- not ready yet
<menuitem id="sortByScoreMenuitem" type="radio" name="sortby" label="&sortByScoreCmd.label;" accesskey="&sortByScoreCmd.accesskey;" oncommand="MsgSortByScore()"/>
-->
<menuseparator/>
<menuitem id="sortAscending" type="radio" name="sortdirection" label="&sortAscending.label;" accesskey="&sortAscending.accesskey;" oncommand="MsgSortAscending()"/>
<menuitem id="sortDescending" type="radio" name="sortdirection" label="&sortDescending.label;" accesskey="&sortDescending.accesskey;" oncommand="MsgSortDescending()"/>
@ -1396,8 +1411,8 @@ Rights Reserved.
</menupopup>
</menu>
<menu id="toolsMenu" label="&toolsMenu.label;" accesskey="&toolsMenu.accesskey;">
<menupopup>
<menu id="tasksMenu">
<menupopup id="taskPopup">
<menuitem label="&searchMailCmd.label;"
key="key_searchMail"
accesskey="&searchMailCmd.accesskey;"
@ -1408,12 +1423,30 @@ Rights Reserved.
<menuitem label="&filtersCmd.label;"
accesskey="&filtersCmd.accesskey;"
oncommand="MsgFilters(null);"/>
<!-- not ready yet
<menuitem label="&junkMailCmd.label;"
accesskey="&junkMailCmd.accesskey;"
oncommand="MsgJunkMail()"/>
<menuseparator/>
<menuitem label="Mark All Messages In Folder As Junk" oncommand="markFolderAsJunk(true);"/>
<menuitem label="Mark All Messages In Folder As Not Junk" oncommand="markFolderAsJunk(false);"/>
<menuitem label="Analyze Folder" oncommand="analyzeFolder();"/>
<menuitem label="Analyze Messages" oncommand="analyzeMessages();"/>
<menuitem label="Write DB" oncommand="writeHash();"/>
<menuseparator/>
-->
<menuitem label="&filtersApply.label;"
accesskey="&filtersApply.accesskey;"
oncommand="MsgApplyFilters(null);"/>
<menuitem label="&importCmd.label;"
accesskey="&importCmd.accesskey;"
oncommand="toImport();"/>
<menuseparator/>
</menupopup>
</menu>
<menu id="windowMenu"/>
<menu id="menu_Help"/>
<spacer flex="100%"/>
</menubar>
@ -1523,6 +1556,9 @@ Rights Reserved.
</toolbarbutton>
<toolbarbutton class="toolbarbutton-1" id="button-next" label="&nextButton.label;" oncommand="goDoCommand('button_next')" tooltiptext="&nextButton.tooltip;" observes="button_next"/>
<toolbarbutton class="toolbarbutton-1" id="button-delete" label="&deleteButton.label;" tooltiptext="&deleteButton.tooltip;" observes="button_delete" oncommand="goDoCommand('button_delete')"/>
<!-- not ready yet
<toolbarbutton class="toolbarbutton-1" id="button-junk" label="&junkButton.label;" tooltiptext="&junkButton.tooltip;" observes="button_junk" oncommand="goDoCommand('button_junk')"/>
-->
<toolbarbutton type="menu-button" id="button-mark" class="toolbarbutton-1" label="&markButton.label;" hidden="true" oncommand="goDoCommand('button_mark')"
observes="button_mark" tooltiptext="&markButton.tooltip;">
<menupopup onpopupshowing="InitMessageMark()">
@ -1551,7 +1587,7 @@ Rights Reserved.
<hbox id="searchBox" persist="collapsed" align="center">
<label id="searchCriteria" value="&SearchSubjectOrSender.label;" control="searchInput"
accesskey="&SearchSubjectOrSender.accesskey;"/>
<textbox id="searchInput" flex="1" onfocus="this.select();" oninput="onSearchInput(false);" onkeypress="onSearchKeyPress(event);"/>
<textbox id="searchInput" flex="5" onfocus="this.select();" oninput="onSearchInput(false);" onkeypress="onSearchKeyPress(event);"/>
<button id="clearButton" label="&clearButton.label;" disabled="true" tooltiptext="&clearButton.tooltip;" oncommand="onClearSearch();"
accesskey="&clearButton.accesskey;"/>
<button id="advancedButton" label="&advancedButton.label;" tooltiptext="&advancedButton.tooltip;" oncommand="onAdvancedSearch();"

Просмотреть файл

@ -1,890 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
/* This is where functions related to the standalone message window are kept */
/* globals for a particular window */
var compositeDataSourceContractID = datasourceContractIDPrefix + "composite-datasource";
var gCompositeDataSource;
var gCurrentMessageUri;
var gCurrentFolderUri;
var gThreadPaneCommandUpdater = null;
var gCurrentMessageIsDeleted = false;
var gNextMessageViewIndexAfterDelete = -2;
// the folderListener object
var folderListener = {
OnItemAdded: function(parentItem, item, view) {},
OnItemRemoved: function(parentItem, item, view) {
var parentFolderResource = parentItem.QueryInterface(Components.interfaces.nsIRDFResource);
if(!parentFolderResource)
return;
var parentURI = parentFolderResource.Value;
if(parentURI != gCurrentFolderUri)
return;
var deletedMessageHdr = item.QueryInterface(Components.interfaces.nsIMsgDBHdr);
if (extractMsgKeyFromURI() == deletedMessageHdr.messageKey)
gCurrentMessageIsDeleted = true;
},
OnItemPropertyChanged: function(item, property, oldValue, newValue) {},
OnItemIntPropertyChanged: function(item, property, oldValue, newValue) { },
OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) {},
OnItemUnicharPropertyChanged: function(item, property, oldValue, newValue){},
OnItemPropertyFlagChanged: function(item, property, oldFlag, newFlag) {},
OnItemEvent: function(folder, event) {
if (event.GetUnicode() == "DeleteOrMoveMsgCompleted") {
HandleDeleteOrMoveMsgCompleted(folder);
}
else if (event.GetUnicode() == "DeleteOrMoveMsgFailed") {
HandleDeleteOrMoveMsgFailed(folder);
}
else if (event.GetUnicode() == "msgLoaded") {
OnMsgLoaded(folder, gCurrentMessageUri);
}
}
}
var messagepaneObserver = {
canHandleMultipleItems: false,
onDrop: function (aEvent, aData, aDragSession)
{
var sourceUri = aData.data;
if (sourceUri != gCurrentMessageUri)
{
var msgHdr = GetMsgHdrFromUri(sourceUri);
var folderUri = msgHdr.folder.URI;
if (folderUri != gCurrentFolderUri)
UpdateDBView(folderUri);
SelectMessage(sourceUri);
}
},
onDragOver: function (aEvent, aFlavour, aDragSession)
{
var messagepanebox = document.getElementById("messagepanebox");
messagepanebox.setAttribute("dragover", "true");
},
onDragExit: function (aEvent, aDragSession)
{
var messagepanebox = document.getElementById("messagepanebox");
messagepanebox.removeAttribute("dragover");
},
canDrop: function(aEvent, aDragSession) //allow drop from mail:3pane window only - 4xp
{
var doc = aDragSession.sourceNode.ownerDocument;
var elem = doc.getElementById("messengerWindow");
return (elem && (elem.getAttribute("windowtype") == "mail:3pane"));
},
getSupportedFlavours: function ()
{
var flavourSet = new FlavourSet();
flavourSet.appendFlavour("text/x-moz-message");
return flavourSet;
}
};
function UpdateDBView(folderUri)
{
var dbview = GetDBView(); //close old folder view
if (dbview) {
dbview.close();
}
SelectFolder(folderUri);
CreateView(null); //create new folder view
}
function nsMsgDBViewCommandUpdater()
{}
function UpdateStandAloneMessageCounts()
{
// hook for extra toolbar items
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(window, "mail:updateStandAloneMessageCounts", "");
}
nsMsgDBViewCommandUpdater.prototype =
{
updateCommandStatus : function()
{
// the back end is smart and is only telling us to update command status
// when the # of items in the selection has actually changed.
UpdateMailToolbar("dbview, std alone window");
},
displayMessageChanged : function(aFolder, aSubject, aKeywords)
{
setTitleFromFolder(aFolder, aSubject);
gCurrentMessageUri = gDBView.URIForFirstSelectedMessage;
UpdateStandAloneMessageCounts();
SetKeywords(aKeywords);
},
QueryInterface : function(iid)
{
if(iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater))
return this;
throw Components.results.NS_NOINTERFACE;
return null;
}
}
// from MailNewsTypes.h
const nsMsgKey_None = 0xFFFFFFFF;
function HandleDeleteOrMoveMsgCompleted(folder)
{
dump("In HandleDeleteOrMoveMsgCompleted\n");
var folderResource = folder.QueryInterface(Components.interfaces.nsIRDFResource);
if(!folderResource)
return;
var folderUri = folderResource.Value;
if((folderUri == gCurrentFolderUri) && gCurrentMessageIsDeleted)
{
gCurrentMessageIsDeleted = false;
if (gNextMessageViewIndexAfterDelete != nsMsgKey_None)
{
var nextMstKey = gDBView.getKeyAt(gNextMessageViewIndexAfterDelete);
if (nextMstKey != nsMsgKey_None) {
gDBView.loadMessageByMsgKey(nextMstKey);
}
else {
window.close();
}
}
else
{
// close the stand alone window because there are no more messages in the folder
window.close();
}
}
}
function HandleDeleteOrMoveMsgFailed(folder)
{
var folderResource = folder.QueryInterface(Components.interfaces.nsIRDFResource);
if(!folderResource)
return;
var folderUri = folderResource.Value;
if((folderUri == gCurrentFolderUri) && gCurrentMessageIsDeleted)
{
gCurrentMessageIsDeleted = false;
}
}
function OnLoadMessageWindow()
{
HideMenus();
AddMailOfflineObserver();
CreateMailWindowGlobals();
CreateMessageWindowGlobals();
verifyAccounts(null);
InitMsgWindow();
messenger.SetWindow(window, msgWindow);
InitializeDataSources();
// FIX ME - later we will be able to use onload from the overlay
OnLoadMsgHeaderPane();
try {
var nsIFolderListener = Components.interfaces.nsIFolderListener;
var notifyFlags = nsIFolderListener.removed | nsIFolderListener.event;
mailSession.AddFolderListener(folderListener, notifyFlags);
} catch (ex) {
dump("Error adding to session: " +ex + "\n");
}
var originalView = null;
if(window.arguments)
{
if(window.arguments[0])
{
gCurrentMessageUri = window.arguments[0];
}
else
{
gCurrentMessageUri = null;
}
if(window.arguments[1])
{
gCurrentFolderUri = window.arguments[1];
}
else
{
gCurrentFolderUri = null;
}
if (window.arguments[2])
originalView = window.arguments[2];
}
CreateView(originalView)
setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; UpdateStandAloneMessageCounts();", 0);
SetupCommandUpdateHandlers();
var messagePaneFrame = top.frames['messagepane'];
if(messagePaneFrame)
messagePaneFrame.focus();
}
function CreateView(originalView)
{
var msgFolder = GetLoadedMsgFolder();
// extract the sort type, the sort order,
var sortType;
var sortOrder;
var viewFlags;
var viewType;
if (originalView)
{
viewType = originalView.viewType;
viewFlags = originalView.viewFlags;
sortType = originalView.sortType;
sortOrder = originalView.sortOrder;
}
else if (msgFolder)
{
var msgDatabase = msgFolder.getMsgDatabase(msgWindow);
if (msgDatabase)
{
var dbFolderInfo = msgDatabase.dBFolderInfo;
sortType = dbFolderInfo.sortType;
sortOrder = dbFolderInfo.sortOrder;
viewFlags = dbFolderInfo.viewFlags;
viewType = dbFolderInfo.viewType;
msgDatabase = null;
dbFolderInfo = null;
}
}
// create a db view
CreateBareDBView(originalView, msgFolder, viewType, viewFlags, sortType, sortOrder);
var uri;
if (gCurrentMessageUri)
uri = gCurrentMessageUri;
else if (gCurrentFolderUri)
uri = gCurrentFolderUri;
else
uri = null;
SetUpToolbarButtons(uri);
// hook for extra toolbar items
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(window, "mail:setupToolbarItems", uri);
}
function extractMsgKeyFromURI()
{
var msgKey = -1;
var msgService = messenger.messageServiceFromURI(gCurrentMessageUri);
if (msgService)
{
var msgHdr = msgService.messageURIToMsgHdr(gCurrentMessageUri);
if (msgHdr)
msgKey = msgHdr.messageKey;
}
return msgKey;
}
function HideMenus()
{
var message_menuitem=document.getElementById('menu_showMessage');
if(message_menuitem)
message_menuitem.setAttribute("hidden", "true");
var expandOrCollapseMenu = document.getElementById('menu_expandOrCollapse');
if(expandOrCollapseMenu)
expandOrCollapseMenu.setAttribute("hidden", "true");
var renameFolderMenu = document.getElementById('menu_renameFolder');
if(renameFolderMenu)
renameFolderMenu.setAttribute("hidden", "true");
var viewMessagesMenu = document.getElementById('viewMessagesMenu');
if(viewMessagesMenu)
viewMessagesMenu.setAttribute("hidden", "true");
var openMessageMenu = document.getElementById('openMessageWindowMenuitem');
if(openMessageMenu)
openMessageMenu.setAttribute("hidden", "true");
var viewSortMenu = document.getElementById('viewSortMenu');
if(viewSortMenu)
viewSortMenu.setAttribute("hidden", "true");
var viewThreadedMenu = document.getElementById('menu_showThreads');
if(viewThreadedMenu)
viewThreadedMenu.setAttribute("hidden", "true");
var emptryTrashMenu = document.getElementById('menu_emptyTrash');
if(emptryTrashMenu)
emptryTrashMenu.setAttribute("hidden", "true");
var menuProperties = document.getElementById('menu_properties');
if(menuProperties)
menuProperties.setAttribute("hidden", "true");
var compactFolderMenu = document.getElementById('menu_compactFolder');
if(compactFolderMenu)
compactFolderMenu.setAttribute("hidden", "true");
var trashSeparator = document.getElementById('trashMenuSeparator');
if(trashSeparator)
trashSeparator.setAttribute("hidden", "true");
}
function OnUnloadMessageWindow()
{
// FIX ME - later we will be able to use onunload from the overlay
OnUnloadMsgHeaderPane();
OnMailWindowUnload();
}
function CreateMessageWindowGlobals()
{
gCompositeDataSource = Components.classes[compositeDataSourceContractID].createInstance();
gCompositeDataSource = gCompositeDataSource.QueryInterface(Components.interfaces.nsIRDFCompositeDataSource);
}
function InitializeDataSources()
{
AddDataSources();
//Now add datasources to composite datasource
gCompositeDataSource.AddDataSource(accountManagerDataSource);
gCompositeDataSource.AddDataSource(folderDataSource);
}
function GetSelectedMsgFolders()
{
var folderArray = new Array(1);
var msgFolder = GetLoadedMsgFolder();
if(msgFolder)
{
folderArray[0] = msgFolder;
}
return folderArray;
}
function GetFirstSelectedMessage()
{
return GetLoadedMessage();
}
function GetNumSelectedMessages()
{
if(gCurrentMessageUri)
return 1;
else
return 0;
}
function GetSelectedMessages()
{
var messageArray = new Array(1);
var message = GetLoadedMessage();
if(message) {
messageArray[0] = message;
}
return messageArray;
}
function GetSelectedIndices(dbView)
{
try {
var indicesArray = {};
var length = {};
dbView.getIndicesForSelection(indicesArray,length);
return indicesArray.value;
}
catch (ex) {
dump("ex = " + ex + "\n");
return null;
}
}
function GetLoadedMsgFolder()
{
if(gCurrentFolderUri)
{
var folderResource = RDF.GetResource(gCurrentFolderUri);
if(folderResource)
{
var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
return msgFolder;
}
}
return null;
}
function GetLoadedMessage()
{
return gCurrentMessageUri;
}
//Clear everything related to the current message. called after load start page.
function ClearMessageSelection()
{
gCurrentMessageUri = null;
gCurrentFolderUri = null;
UpdateMailToolbar("clear msg, std alone window");
}
function GetCompositeDataSource(command)
{
return gCompositeDataSource;
}
function SetNextMessageAfterDelete()
{
gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;
}
function SelectFolder(folderUri)
{
gCurrentFolderUri = folderUri;
}
function GetMsgHdrFromUri(messageUri)
{
return messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
}
function SelectMessage(messageUri)
{
var msgHdr = GetMsgHdrFromUri(messageUri);
gDBView.loadMessageByMsgKey(msgHdr.messageKey);
}
function ReloadMessage()
{
gDBView.reloadMessage();
}
function MsgDeleteMessageFromMessageWindow(reallyDelete, fromToolbar)
{
// if from the toolbar, return right away if this is a news message
// only allow cancel from the menu: "Edit | Cancel / Delete Message"
if (fromToolbar)
{
if (isNewsURI(gCurrentFolderUri))
{
// if news, don't delete
return;
}
}
// before we delete
SetNextMessageAfterDelete();
if (reallyDelete)
gDBView.doCommand(nsMsgViewCommandType.deleteNoTrash);
else
gDBView.doCommand(nsMsgViewCommandType.deleteMsg);
}
// MessageWindowController object (handles commands when one of the trees does not have focus)
var MessageWindowController =
{
supportsCommand: function(command)
{
switch ( command )
{
case "cmd_close":
case "cmd_reply":
case "button_reply":
case "cmd_replySender":
case "cmd_replyGroup":
case "cmd_replyall":
case "button_replyall":
case "cmd_forward":
case "button_forward":
case "cmd_forwardInline":
case "cmd_forwardAttachment":
case "cmd_editAsNew":
case "cmd_createFilterFromPopup":
case "cmd_createFilterFromMenu":
case "cmd_delete":
case "cmd_undo":
case "cmd_redo":
case "cmd_killThread":
case "cmd_watchThread":
case "button_delete":
case "cmd_shiftDelete":
case "button_print":
case "cmd_print":
case "cmd_printSetup":
case "cmd_saveAsFile":
case "cmd_saveAsTemplate":
case "cmd_viewPageSource":
case "cmd_reload":
case "cmd_getNewMessages":
case "button_getNewMessages":
case "cmd_getMsgsForAuthAccounts":
case "cmd_getNextNMessages":
case "cmd_find":
case "cmd_findAgain":
case "cmd_search":
case "button_mark":
case "cmd_markAsRead":
case "cmd_markAllRead":
case "cmd_markThreadAsRead":
case "cmd_markAsFlagged":
case "cmd_label0":
case "cmd_label1":
case "cmd_label2":
case "cmd_label3":
case "cmd_label4":
case "cmd_label5":
case "button_file":
case "cmd_file":
case "cmd_settingsOffline":
case "cmd_nextMsg":
case "button_next":
case "cmd_nextUnreadMsg":
case "cmd_nextFlaggedMsg":
case "cmd_nextUnreadThread":
case "cmd_previousMsg":
case "cmd_previousUnreadMsg":
case "cmd_previousFlaggedMsg":
return true;
case "cmd_synchronizeOffline":
case "cmd_downloadFlagged":
case "cmd_downloadSelected":
return CheckOnline();
default:
return false;
}
},
isCommandEnabled: function(command)
{
switch ( command )
{
case "cmd_createFilterFromPopup":
case "cmd_createFilterFromMenu":
var loadedFolder = GetLoadedMsgFolder();
if (!(loadedFolder && loadedFolder.server.canHaveFilters))
return false;
case "cmd_delete":
UpdateDeleteCommand();
// fall through
case "button_delete":
case "cmd_shiftDelete":
var loadedFolder = GetLoadedMsgFolder();
return gCurrentMessageUri && loadedFolder && loadedFolder.canDeleteMessages;
case "cmd_reply":
case "button_reply":
case "cmd_replySender":
case "cmd_replyGroup":
case "cmd_replyall":
case "button_replyall":
case "cmd_forward":
case "button_forward":
case "cmd_forwardInline":
case "cmd_forwardAttachment":
case "cmd_editAsNew":
case "cmd_print":
case "button_print":
case "cmd_saveAsFile":
case "cmd_saveAsTemplate":
case "cmd_viewPageSource":
case "cmd_reload":
case "cmd_find":
case "button_mark":
case "cmd_markAsRead":
case "cmd_markAllRead":
case "cmd_markThreadAsRead":
case "cmd_label0":
case "cmd_label1":
case "cmd_label2":
case "cmd_label3":
case "cmd_label4":
case "cmd_label5":
return(true);
case "cmd_markAsFlagged":
case "button_file":
case "cmd_file":
return ( gCurrentMessageUri != null);
case "cmd_printSetup":
return true;
case "cmd_getNewMessages":
case "button_getNewMessages":
case "cmd_getMsgsForAuthAccounts":
return IsGetNewMessagesEnabled();
case "cmd_getNextNMessages":
return IsGetNextNMessagesEnabled();
case "cmd_downloadFlagged":
case "cmd_downloadSelected":
case "cmd_synchronizeOffline":
return CheckOnline();
case "cmd_settingsOffline":
return IsAccountOfflineEnabled();
case "cmd_close":
case "cmd_nextMsg":
case "button_next":
case "cmd_nextUnreadMsg":
case "cmd_nextUnreadThread":
case "cmd_previousMsg":
case "cmd_previousUnreadMsg":
return true;
case "cmd_findAgain":
return MsgCanFindAgain();
case "cmd_search":
var loadedFolder = GetLoadedMsgFolder();
if (!loadedFolder)
return false;
return loadedFolder.server.canSearchMessages;
case "cmd_undo":
case "cmd_redo":
return SetupUndoRedoCommand(command);
default:
return false;
}
},
doCommand: function(command)
{
// if the user invoked a key short cut then it is possible that we got here for a command which is
// really disabled. kick out if the command should be disabled.
if (!this.isCommandEnabled(command)) return;
var navigationType = nsMsgNavigationType.nextUnreadMessage;
switch ( command )
{
case "cmd_close":
CloseMailWindow();
break;
case "cmd_getNewMessages":
MsgGetMessage();
break;
case "cmd_undo":
messenger.Undo(msgWindow);
break;
case "cmd_redo":
messenger.Redo(msgWindow);
break;
case "cmd_getMsgsForAuthAccounts":
MsgGetMessagesForAllAuthenticatedAccounts();
break;
case "cmd_getNextNMessages":
MsgGetNextNMessages();
break;
case "cmd_reply":
MsgReplyMessage(null);
break;
case "cmd_replySender":
MsgReplySender(null);
break;
case "cmd_replyGroup":
MsgReplyGroup(null);
break;
case "cmd_replyall":
MsgReplyToAllMessage(null);
break;
case "cmd_forward":
MsgForwardMessage(null);
break;
case "cmd_forwardInline":
MsgForwardAsInline(null);
break;
case "cmd_forwardAttachment":
MsgForwardAsAttachment(null);
break;
case "cmd_editAsNew":
MsgEditMessageAsNew();
break;
case "cmd_createFilterFromPopup":
break;// This does nothing because the createfilter is invoked from the popupnode oncommand.
case "cmd_createFilterFromMenu":
MsgCreateFilter();
break;
case "cmd_delete":
MsgDeleteMessageFromMessageWindow(false, false);
break;
case "cmd_shiftDelete":
MsgDeleteMessageFromMessageWindow(true, false);
break;
case "button_delete":
MsgDeleteMessageFromMessageWindow(false, true);
break;
case "cmd_printSetup":
goPageSetup();
break;
case "cmd_print":
PrintEnginePrint();
break;
case "cmd_saveAsFile":
MsgSaveAsFile();
break;
case "cmd_saveAsTemplate":
MsgSaveAsTemplate();
break;
case "cmd_viewPageSource":
MsgViewPageSource();
break;
case "cmd_reload":
MsgReload();
break;
case "cmd_find":
MsgFind();
break;
case "cmd_findAgain":
MsgFindAgain();
break;
case "cmd_search":
MsgSearchMessages();
break;
case "button_mark":
case "cmd_markAsRead":
MsgMarkMsgAsRead(null);
return;
case "cmd_markThreadAsRead":
MsgMarkThreadAsRead();
return;
case "cmd_markAllRead":
MsgMarkAllRead();
return;
case "cmd_markAsFlagged":
MsgMarkAsFlagged(null);
return;
case "cmd_label0":
gDBView.doCommand(nsMsgViewCommandType.label0);
return;
case "cmd_label1":
gDBView.doCommand(nsMsgViewCommandType.label1);
return;
case "cmd_label2":
gDBView.doCommand(nsMsgViewCommandType.label2);
return;
case "cmd_label3":
gDBView.doCommand(nsMsgViewCommandType.label3);
return;
case "cmd_label4":
gDBView.doCommand(nsMsgViewCommandType.label4);
return;
case "cmd_label5":
gDBView.doCommand(nsMsgViewCommandType.label5);
return;
case "cmd_downloadFlagged":
MsgDownloadFlagged();
return;
case "cmd_downloadSelected":
MsgDownloadSelected();
return;
case "cmd_synchronizeOffline":
MsgSynchronizeOffline();
return;
case "cmd_settingsOffline":
MsgSettingsOffline();
return;
case "cmd_nextUnreadMsg":
case "button_next":
performNavigation(nsMsgNavigationType.nextUnreadMessage);
break;
case "cmd_nextUnreadThread":
performNavigation(nsMsgNavigationType.nextUnreadThread);
break;
case "cmd_nextMsg":
performNavigation(nsMsgNavigationType.nextMessage);
break;
case "cmd_nextFlaggedMsg":
performNavigation(nsMsgNavigationType.nextFlagged);
break;
case "cmd_previousMsg":
performNavigation(nsMsgNavigationType.previousMessage);
break;
case "cmd_previousUnreadMsg":
performNavigation(nsMsgNavigationType.previousUnreadMessage);
break;
case "cmd_previousFlaggedMsg":
performNavigation(nsMsgNavigationType.previousFlagged);
break;
}
},
onEvent: function(event)
{
}
};
function performNavigation(type)
{
var resultId = new Object;
var resultIndex = new Object;
var threadIndex = new Object;
gDBView.viewNavigate(type, resultId, resultIndex, threadIndex, true /* wrap */);
// if we found something....display it.
if ((resultId.value != nsMsgKey_None) && (resultIndex.value != nsMsgKey_None))
{
// load the message key
gDBView.loadMessageByMsgKey(resultId.value);
// if we changed folders, the message counts changed.
UpdateStandAloneMessageCounts();
return;
}
// we need to span another folder
CrossFolderNavigation(type, false);
}
function SetupCommandUpdateHandlers()
{
top.controllers.insertControllerAt(0, MessageWindowController);
}
function GetDBView()
{
return gDBView;
}

Просмотреть файл

@ -1,144 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/messageWindow.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/platformMailnewsOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/msgHdrViewOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
%messengerDTD;
]>
<window id="messengerWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:nc="http://home.netscape.com/NC-rdf#"
title="&messengerWindow.title;"
titlemodifier="&titleModifier.label;"
titlemenuseparator="&titleSeparator.label;"
onload="OnLoadMessageWindow()"
onunload="OnUnloadMessageWindow()"
width="750"
height="500"
persist="width height screenX screenY sizemode"
windowtype="mail:messageWindow">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_offlinePrompts" src="chrome://messenger/locale/offline.properties"/>
</stringbundleset>
<!-- XXX: Replace strres.js when nsContextMenu.js is converted -->
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/shareglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/messageWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/nsContextMenu.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailContextMenus.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/msgViewNavigation.js"/>
<commandset id="mailCommands">
<commandset id="mailFileMenuItems"/>
<commandset id="mailViewMenuItems"/>
<commandset id="mailEditMenuItems"/>
<commandset id="mailSearchMenuItems"/>
<commandset id="mailGoMenuItems"/>
<commandset id="mailMessageMenuItems"/>
<commandset id="mailToolbarItems"/>
<commandset id="mailGetMsgMenuItems"/>
<commandset id="mailMarkMenuItems"/>
<commandset id="mailLabelMenuItems"/>
<commandset id="mailEditContextMenuItems"/>
<commandset id="tasksCommands"/>
<commandset id="commandKeys"/>
</commandset>
<broadcasterset id="mailBroadcasters">
<!-- File Menu -->
<broadcaster id="Communicator:WorkMode"/>
<!-- Edit Menu -->
</broadcasterset>
<keyset id="mailKeys">
<keyset id="tasksKeys"/>
</keyset>
<popupset>
<popup id="emailAddressPopup" popupanchor="bottomleft" onpopupshowing="goUpdateCommand('cmd_createFilterFromPopup')">
<menuitem label="&AddToAddressBook.label;"
accesskey="&AddToAddressBook.accesskey;"
oncommand="AddNodeToAddressBook(document.popupNode)"/>
<menuitem label="&SendMailTo.label;"
accesskey="&SendMailTo.accesskey;"
oncommand="SendMailToNode(document.popupNode)"/>
<menuitem label="&CopyEmailAddress.label;"
accesskey="&CopyEmailAddress.accesskey;"
oncommand="CopyEmailAddress(document.popupNode)"/>
<menuitem label="&CreateFilter.label;"
accesskey="&CreateFilter.accesskey;"
oncommand="CreateFilter(document.popupNode)"
observes="cmd_createFilterFromPopup"/>
</popup>
<popup id="allHeadersPopup" onpopupshowing="return fillAllHeadersPopup(document.popupNode);" popupanchor="bottomleft">
<hbox id="allHeadersPopupContainer"/>
</popup>
<popup id="messagePaneContext"/>
</popupset>
<popup id="attachmentListContext"/>
<toolbox id="mailToolbarToolbox">
<menubar id="mailMenubar"/>
</toolbox>
<!-- msg header view -->
<vbox id="messagesBox" flex="1">
<vbox id="messagepanebox" flex="3" persist="collapsed"
ondragover="nsDragAndDrop.dragOver(event, messagepaneObserver);"
ondragdrop="nsDragAndDrop.drop(event, messagepaneObserver);"
ondragexit="nsDragAndDrop.dragExit(event, messagepaneObserver);">
<hbox id="msgHeaderView"/>
<!-- message view -->
<browser id="messagepane" context="messagePaneContext" style="height: 0px" flex="1" name="messagepane"
disableHistory="true" type="content-primary" src="about:blank" onclick="contentAreaClick(event);"/>
</vbox>
</vbox>
<statusbar class="chromeclass-status" id="status-bar"/>
</window>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,436 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* disttsc@bart.nl
* jarrod.k.gray@rose-hulman.edu
* Jan Varga <varga@utcru.sk>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// cache these services
var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService().QueryInterface(Components.interfaces.nsIRDFService);
var dragService = Components.classes["@mozilla.org/widget/dragservice;1"].getService().QueryInterface(Components.interfaces.nsIDragService);
var nsIDragService = Components.interfaces.nsIDragService;
function debugDump(msg)
{
// uncomment for noise
//dump(msg+"\n");
}
function CanDropOnFolderTree(index)
{
var dragSession = null;
var dragFolder = false;
dragSession = dragService.getCurrentSession();
if (! dragSession)
return false;
var flavorSupported = dragSession.isDataFlavorSupported("text/x-moz-message") || dragSession.isDataFlavorSupported("text/x-moz-folder");
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
if (! trans)
return false;
trans.addDataFlavor("text/x-moz-message");
trans.addDataFlavor("text/x-moz-folder");
var folderTree = GetFolderTree();
var targetResource = GetFolderResource(folderTree, index);
var targetUri = targetResource.Value;
var targetFolder = targetResource.QueryInterface(Components.interfaces.nsIMsgFolder);
var targetServer = targetFolder.server;
var sourceServer;
var sourceResource;
for (var i = 0; i < dragSession.numDropItems; i++)
{
dragSession.getData (trans, i);
var dataObj = new Object();
var dataFlavor = new Object();
var len = new Object();
try
{
trans.getAnyTransferData (dataFlavor, dataObj, len );
}
catch (ex)
{
continue; //no data so continue;
}
if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj)
continue;
// pull the URL out of the data object
var sourceUri = dataObj.data.substring(0, len.value);
if (! sourceUri)
continue;
if (dataFlavor.value == "text/x-moz-message")
{
sourceResource = null;
var isServer = GetFolderAttribute(folderTree, targetResource, "IsServer");
if (isServer == "true")
{
debugDump("***isServer == true\n");
return false;
}
// canFileMessages checks no select, and acl, for imap.
var canFileMessages = GetFolderAttribute(folderTree, targetResource, "CanFileMessages");
if (canFileMessages != "true")
{
debugDump("***canFileMessages == false\n");
return false;
}
var hdr = messenger.messageServiceFromURI(sourceUri).messageURIToMsgHdr(sourceUri);
if (hdr.folder == targetFolder)
return false;
break;
}
// we should only get here if we are dragging and dropping folders
dragFolder = true;
sourceResource = RDF.GetResource(sourceUri);
var sourceFolder = sourceResource.QueryInterface(Components.interfaces.nsIMsgFolder);
sourceServer = sourceFolder.server;
if (targetUri == sourceUri)
return false;
//don't allow drop on different imap servers.
if (sourceServer != targetServer && targetServer.type == "imap")
return false;
//don't allow immediate child to be dropped to it's parent
if (targetFolder.URI == sourceFolder.parent.URI)
{
debugDump(targetFolder.URI + "\n");
debugDump(sourceFolder.parent.URI + "\n");
return false;
}
var isAncestor = sourceFolder.isAncestorOf(targetFolder);
// don't allow parent to be dropped on its ancestors
if (isAncestor)
return false;
}
if (dragFolder)
{
//first check these conditions then proceed further
debugDump("***isFolderFlavor == true \n");
// no copy for folder drag
if (dragSession.dragAction == nsIDragService.DRAGDROP_ACTION_COPY)
return false;
var canCreateSubfolders = GetFolderAttribute(folderTree, targetResource, "CanCreateSubfolders");
// if cannot create subfolders then a folder cannot be dropped here
if (canCreateSubfolders == "false")
{
debugDump("***canCreateSubfolders == false \n");
return false;
}
var serverType = GetFolderAttribute(folderTree, targetResource, "ServerType");
// if we've got a folder that can't be renamed
// allow us to drop it if we plan on dropping it on "Local Folders"
// (but not within the same server, to prevent renaming folders on "Local Folders" that
// should not be renamed)
var srcCanRename = GetFolderAttribute(folderTree, sourceResource, "CanRename");
if (srcCanRename == "false") {
if (sourceServer == targetServer)
return false;
if (serverType != "none")
return false;
}
}
//message or folder
if (flavorSupported)
{
dragSession.canDrop = true;
return true;
}
return false;
}
function CanDropBeforeAfterFolderTree(index, before)
{
return false;
}
function DropOnFolderTree(row, orientation)
{
if (orientation != Components.interfaces.nsITreeView.inDropOn)
return false;
var folderTree = GetFolderTree();
var targetResource = GetFolderResource(folderTree, row);
var targetUri = targetResource.Value;
debugDump("***targetUri = " + targetUri + "\n");
var dragSession = dragService.getCurrentSession();
if (! dragSession )
return false;
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
trans.addDataFlavor("text/x-moz-message");
trans.addDataFlavor("text/x-moz-folder");
var list = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
var dropMessage;
var sourceUri;
var sourceResource;
var sourceFolder;
var sourceServer;
for (var i = 0; i < dragSession.numDropItems; i++)
{
dragSession.getData (trans, i);
var dataObj = new Object();
var flavor = new Object();
var len = new Object();
trans.getAnyTransferData(flavor, dataObj, len);
if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj)
continue;
// pull the URL out of the data object
sourceUri = dataObj.data.substring(0, len.value);
if (! sourceUri)
continue;
debugDump(" Node #" + i + ": drop " + sourceUri + " to " + targetUri + "\n");
// only do this for the first object, either they are all messages or they are all folders
if (i == 0)
{
if (flavor.value == "text/x-moz-folder")
{
sourceResource = RDF.GetResource(sourceUri);
sourceFolder = sourceResource.QueryInterface(Components.interfaces.nsIMsgFolder);
dropMessage = false; // we are dropping a folder
}
else if (flavor.value == "text/x-moz-message")
dropMessage = true;
}
else {
if (!dropMessage)
dump("drag and drop of multiple folders isn't supported\n");
}
if (dropMessage) {
// from the message uri, get the appropriate messenger service
// and then from that service, get the msgDbHdr
list.AppendElement(messenger.messageServiceFromURI(sourceUri).messageURIToMsgHdr(sourceUri));
}
else {
// Prevent dropping of a node before, after, or on itself
if (sourceResource == targetResource)
continue;
list.AppendElement(sourceResource);
}
}
if (list.Count() < 1)
return false;
var isSourceNews = false;
isSourceNews = isNewsURI(sourceUri);
var targetFolder = targetResource.QueryInterface(Components.interfaces.nsIMsgFolder);
var targetServer = targetFolder.server;
if (dropMessage) {
var sourceMsgHdr = list.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgDBHdr);
sourceFolder = sourceMsgHdr.folder;
sourceServer = sourceFolder.server;
try {
if (isSourceNews) {
// news to pop or imap is always a copy
messenger.CopyMessages(sourceFolder, targetFolder, list, false);
}
else {
var dragAction = dragSession.dragAction;
if (dragAction == nsIDragService.DRAGDROP_ACTION_COPY)
messenger.CopyMessages(sourceFolder, targetFolder, list, false);
else if (dragAction == nsIDragService.DRAGDROP_ACTION_MOVE)
messenger.CopyMessages(sourceFolder, targetFolder, list, true);
}
}
catch (ex) {
dump("failed to copy messages: " + ex + "\n");
}
}
else {
sourceServer = sourceFolder.server;
try
{
messenger.CopyFolders(GetFolderDatasource(), targetResource, list, (sourceServer == targetServer));
}
catch(ex)
{
dump ("Exception : CopyFolders " + ex + "\n");
}
}
return true;
}
function BeginDragFolderTree(event)
{
debugDump("BeginDragFolderTree\n");
if (event.originalTarget.localName != "treechildren")
return false;
var folderTree = GetFolderTree();
var row = {};
var col = {};
var elt = {};
folderTree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, elt);
if (row.value == -1)
return false;
var folderResource = GetFolderResource(folderTree, row.value);
if (GetFolderAttribute(folderTree, folderResource, "IsServer") == "true")
{
debugDump("***IsServer == true\n");
return false;
}
// do not allow the drag when news is the source
if (GetFolderAttribute(folderTree, folderResource, "ServerType") == "nntp")
{
debugDump("***ServerType == nntp\n");
return false;
}
var selectedFolders = GetSelectedFolders();
return BeginDragTree(event, folderTree, selectedFolders, "text/x-moz-folder");
}
function BeginDragThreadPane(event)
{
debugDump("BeginDragThreadPane\n");
var threadTree = GetThreadTree();
var selectedMessages = GetSelectedMessages();
//A message can be dragged from one window and dropped on another window
//therefore setNextMessageAfterDelete() here
//no major disadvantage even if it is a copy operation
SetNextMessageAfterDelete();
return BeginDragTree(event, threadTree, selectedMessages, "text/x-moz-message");
}
function BeginDragTree(event, tree, selArray, flavor)
{
var dragStarted = false;
var transArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
if ( !transArray )
return false;
// let's build the drag region
var region = null;
try {
region = Components.classes["@mozilla.org/gfx/region;1"].createInstance(Components.interfaces.nsIScriptableRegion);
region.init();
var obo = tree.treeBoxObject;
var bo = obo.treeBody.boxObject;
var obosel= obo.selection;
var rowX = bo.x;
var rowY = bo.y;
var rowHeight = obo.rowHeight;
var rowWidth = bo.width;
//add a rectangle for each visible selected row
for (var i = obo.getFirstVisibleRow(); i <= obo.getLastVisibleRow(); i ++)
{
if (obosel.isSelected(i))
region.unionRect(rowX, rowY, rowWidth, rowHeight);
rowY = rowY + rowHeight;
}
//and finally, clip the result to be sure we don't spill over...
if(!region.isEmpty())
region.intersectRect(bo.x, bo.y, bo.width, bo.height);
} catch(ex) {
dump("Error while building selection region: " + ex + "\n");
region = null;
}
var count = selArray.length;
debugDump("selArray.length = " + count + "\n");
for (i = 0; i < count; ++i ) {
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
if (!trans)
return false;
var genTextData = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
if (!genTextData)
return false;
trans.addDataFlavor(flavor);
// get id (url)
var id = selArray[i];
genTextData.data = id;
debugDump(" ID #" + i + " = " + id + "\n");
trans.setTransferData ( flavor, genTextData, id.length * 2 ); // doublebyte byte data
// put it into the transferable as an |nsISupports|
var genTrans = trans.QueryInterface(Components.interfaces.nsISupports);
transArray.AppendElement(genTrans);
}
dragService.invokeDragSession ( event.target, transArray, region, nsIDragService.DRAGDROP_ACTION_COPY +
nsIDragService.DRAGDROP_ACTION_MOVE );
dragStarted = true;
return(!dragStarted); // don't propagate the event if a drag has begun
}

Просмотреть файл

@ -1,246 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*/
var selectedServer = null;
var nsPrefBranch = null;
function OnInit()
{
var title = null;
var titleElement = null;
var brandName = null;
var acctType = null;
var acctName = null;
var brandBundle;
var messengerBundle;
try {
if (!nsPrefBranch) {
var prefService = Components.classes["@mozilla.org/preferences-service;1"];
prefService = prefService.getService();
prefService = prefService.QueryInterface(Components.interfaces.nsIPrefService);
nsPrefBranch = prefService.getBranch(null);
}
}
catch (ex) {
dump("error getting pref service. "+ex+"\n");
}
// Set the header for the page.
// Title containts the brand name of the application and the account
// type (mail/news) and the name of the account
try {
// Get title element from the document
titleElement = document.getElementById("AccountCentralTitle");
// Get the brand name
brandBundle = document.getElementById("bundle_brand");
brandName = brandBundle.getString("brandShortName");
// Get the account type
messengerBundle = document.getElementById("bundle_messenger");
selectedServer = GetSelectedServer();
var serverType = selectedServer.type;
if (serverType == "nntp")
acctType = messengerBundle.getString("newsAcctType");
else
acctType = messengerBundle.getString("mailAcctType");
// Get the account name
var msgFolder = GetSelectedMsgFolder();
acctName = msgFolder.prettyName;
title = messengerBundle.getFormattedString("acctCentralTitleFormat",
[brandName,
acctType,
acctName]);
titleElement.setAttribute("value", title);
// Display and collapse items presented to the user based on account type
var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + serverType];
protocolInfo = protocolInfo.getService(Components.interfaces.nsIMsgProtocolInfo);
ArrangeAccountCentralItems(selectedServer, protocolInfo, msgFolder);
}
catch(ex) {
dump("Error -> " + ex + "\n");
}
}
// Show items in the AccountCentral page depending on the capabilities
// of the given account
function ArrangeAccountCentralItems(server, protocolInfo, msgFolder)
{
try {
/***** Email header and items : Begin *****/
// Read Messages
var canGetMessages = protocolInfo.canGetMessages;
SetItemDisplay("ReadMessages", canGetMessages);
// Compose Messages link
var showComposeMsgLink = protocolInfo.showComposeMsgLink;
SetItemDisplay("ComposeMessage", showComposeMsgLink);
var displayEmailHeader = canGetMessages || showComposeMsgLink;
// Display Email header, only if any of the items are displayed
SetItemDisplay("EmailHeader", displayEmailHeader);
/***** Email header and items : End *****/
/***** News header and items : Begin *****/
// Subscribe to Newsgroups
var canSubscribe = (msgFolder.canSubscribe) && !(protocolInfo.canGetMessages);
SetItemDisplay("SubscribeNewsgroups", canSubscribe);
// Display News header, only if any of the items are displayed
SetItemDisplay("NewsHeader", canSubscribe);
/***** News header and items : End *****/
// If neither of above sections exist, collapse section separators
if (!(canSubscribe || displayEmailHeader)) {
CollapseSectionSeparators("MessagesSection.separator", false);
}
/***** Accounts : Begin *****/
var canShowCreateAccount = ! nsPrefBranch.prefIsLocked("mail.disable_new_account_addition");
SetItemDisplay("CreateAccount", canShowCreateAccount);
/***** Accounts : End *****/
/***** Advanced Features header and items : Begin *****/
// Search Messages
var canSearchMessages = server.canSearchMessages;
SetItemDisplay("SearchMessages", canSearchMessages);
// Create Filters
var canHaveFilters = server.canHaveFilters;
SetItemDisplay("CreateFilters", canHaveFilters);
// Offline Settings
var supportsOffline = (server.offlineSupportLevel != 0);
SetItemDisplay("OfflineSettings", supportsOffline);
var displayAdvFeatures = canSearchMessages || canHaveFilters || supportsOffline;
// Display Adv Features header, only if any of the items are displayed
SetItemDisplay("AdvancedFeaturesHeader", displayAdvFeatures);
/***** Advanced Featuers header and items : End *****/
}
catch (ex) {
dump("Error is setting AccountCentral Items : " + ex + "\n");
}
}
// Collapse the item if the item feature is not supported
function SetItemDisplay(elemId, displayThisItem)
{
if (!displayThisItem) {
var elem = document.getElementById(elemId);
elem.setAttribute("collapsed", true);
var separatorId = elemId + ".separator";
var elemSeparator = document.getElementById(separatorId);
elemSeparator.setAttribute("collapsed", true);
}
}
// Collapse section separators
function CollapseSectionSeparators(separatorBaseId)
{
for (var i=1; i <= 3; i++) {
var separatorId = separatorBaseId + i;
var separator = document.getElementById(separatorId);
separator.setAttribute("collapsed", true);
}
}
// From the current folder tree, return the selected server
function GetSelectedServer()
{
var folderURI = window.parent.GetSelectedFolderURI();
var server = GetServer(folderURI);
return server;
}
// From the current folder tree, return the selected folder
function GetSelectedMsgFolder()
{
var folderURI = window.parent.GetSelectedFolderURI();
var msgFolder = window.parent.GetMsgFolderFromUri(folderURI, true);
return msgFolder;
}
// Open Inbox for selected server.
// If needed, open th twsity and select Inbox.
function ReadMessages()
{
try {
window.parent.OpenInboxForServer(selectedServer);
}
catch(ex) {
dump("Error -> " + ex + "\n");
}
}
// Trigger composer for a new message
function ComposeAMessage(event)
{
window.parent.MsgNewMessage(null);
}
// Open AccountManager to view settings for a given account
// selectPage: the xul file name for the viewing page,
// null for the account main page, other pages are
// 'am-server.xul', 'am-copies.xul', 'am-offline.xul',
// 'am-addressing.xul','am-advanced.xul', 'am-smtp.xul'
function ViewSettings(selectPage)
{
window.parent.MsgAccountManager(selectPage);
}
// Open AccountWizard to create an account
function CreateNewAccount()
{
window.parent.msgOpenAccountWizard();
}
// Bring up search interface for selected account
function SearchMessages()
{
window.parent.MsgSearchMessages();
}
// Open filters window
function CreateMsgFilters()
{
window.parent.MsgFilters(null);
}
// Open Subscribe dialog
function SubscribeNewsgroups()
{
window.parent.MsgSubscribe();
}

Просмотреть файл

@ -1,148 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/accountCentral.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd">
%brandDTD;
<!ENTITY % acctCentralDTD SYSTEM "chrome://messenger/locale/msgAccountCentral.dtd">
%acctCentralDTD;
]>
<page
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="OnInit();">
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script type="application/x-javascript" src="chrome://messenger/content/AccountManager.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/msgMail3PaneWindow.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/msgAccountCentral.js"/>
<grid flex="1" id="acctCentralGrid">
<columns>
<column flex="40" id="acctCentralActionsColumn"/>
<column flex="60" id="acctCentralHelpDataColumn"/>
</columns>
<rows>
<row id="acctCentralHeaderRow">
<label id="AccountCentralTitle"/>
</row>
<separator/>
<row id="EmailHeader" class="acctCentralTitleRow">
<hbox class="acctCentralRowTitleBox">
<description>&emailSectionHdr.label;</description>
</hbox>
</row>
<separator id="EmailHeader.separator" class="thin"/>
<row id="ReadMessages" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&readMsgsLink.label;" onclick="ReadMessages();"/>
</hbox>
</row>
<separator id="ReadMessages.separator" class="thin"/>
<row id="ComposeMessage" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&composeMsgLink.label;" onclick="ComposeAMessage();"/>
</hbox>
</row>
<separator id="ComposeMessage.separator" class="thin"/>
<row id="NewsHeader" class="acctCentralTitleRow">
<hbox class="acctCentralRowTitleBox">
<description>&newsSectionHdr.label;</description>
</hbox>
</row>
<separator id="NewsHeader.separator" class="thin"/>
<row id="SubscribeNewsgroups" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&subscribeNewsLink.label;" onclick="SubscribeNewsgroups();"/>
</hbox>
</row>
<separator id="SubscribeNewsgroups.separator" class="thin"/>
<separator id="MessagesSection.separator1"/>
<separator id="MessagesSection.separator2"/>
<separator id="MessagesSection.separator3"/>
<row id="AccountsHeader" class="acctCentralTitleRow">
<hbox class="acctCentralRowTitleBox">
<description>&accountsSectionHdr.label;</description>
</hbox>
</row>
<separator id="AccountsHeader.separator" class="thin"/>
<row id="AccountSettings" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&settingsLink.label;" onclick="ViewSettings(null);"/>
</hbox>
</row>
<separator id="AccountSettings.separator" class="thin"/>
<row id="CreateAccount" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&newAcctLink.label;" onclick="CreateNewAccount();"/>
</hbox>
</row>
<separator id="CreateAccount.separator" class="thin"/>
<separator id="AccountsSection.separator1"/>
<separator id="AccountsSection.separator2"/>
<separator id="AccountsSection.separator3"/>
<row id="AdvancedFeaturesHeader" class="acctCentralTitleRow">
<hbox class="acctCentralRowTitleBox">
<description>&advFeaturesSectionHdr.label;</description>
</hbox>
</row>
<separator id="AdvancedFeaturesHeader.separator" class="thin"/>
<row id="SearchMessages" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&searchMsgsLink.label;" onclick="SearchMessages();"/>
</hbox>
</row>
<separator id="SearchMessages.separator" class="thin"/>
<row id="CreateFilters" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&filtersLink.label;" onclick="CreateMsgFilters();"/>
</hbox>
</row>
<separator id="CreateFilters.separator" class="thin"/>
<row id="OfflineSettings" class="acctCentralRow">
<hbox>
<label class="acctCentralText acctCentralLinkText" value="&offlineLink.label;" onclick="ViewSettings('am-offline.xul');"/>
</hbox>
</row>
<separator id="OfflineSettings.separator" class="thin"/>
</rows>
</grid>
</page>

Просмотреть файл

@ -1,117 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Alec Flett <alecf@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gMessengerBundle;
// call this from dialog onload() to set the menu item to the correct value
function MsgFolderPickerOnLoad(pickerID)
{
var uri = null;
try {
uri = window.arguments[0].preselectedURI;
}
catch (ex) {
uri = null;
}
if (uri) {
//dump("on loading, set titled button to " + uri + "\n");
// verify that the value we are attempting to
// pre-flight the menu with is valid for this
// picker type
var msgfolder = GetMsgFolderFromUri(uri, true);
if (!msgfolder) return;
var verifyFunction = null;
switch (pickerID) {
case "msgNewFolderPicker":
verifyFunction = msgfolder.canCreateSubfolders;
break;
case "msgRenameFolderPicker":
verifyFunction = msgfolder.canRename;
break;
default:
verifyFunction = msgfolder.canFileMessages;
break;
}
if (verifyFunction) {
SetFolderPicker(uri,pickerID);
}
}
}
function PickedMsgFolder(selection,pickerID)
{
var selectedUri = selection.getAttribute('id');
SetFolderPicker(selectedUri,pickerID);
}
function SetFolderPicker(uri,pickerID)
{
if (!gMessengerBundle)
gMessengerBundle = document.getElementById("bundle_messenger");
var picker = document.getElementById(pickerID);
var msgfolder = GetMsgFolderFromUri(uri, true);
if (!msgfolder) return;
var selectedValue = null;
var serverName;
if (msgfolder.isServer)
selectedValue = msgfolder.name;
else {
if (msgfolder.server)
serverName = msgfolder.server.prettyName;
else {
dump("Cant' find server for " + uri + "\n");
serverName = "???";
}
selectedValue = gMessengerBundle.getFormattedString("verboseFolderFormat",
[msgfolder.name,
serverName]);
}
picker.setAttribute("label",selectedValue);
picker.setAttribute("uri",uri);
}

Просмотреть файл

@ -1,488 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://messenger/skin/folderMenus.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/msgFolderPickerOverlay.dtd">
<overlay id="msgFolderPicker"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<script type="application/x-javascript" src="chrome://messenger/content/msgFolderPickerOverlay.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
<menulist label="&newfolderclickhere.label;" id="msgNewFolderPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanCreateSubfolders="true" nc:CanCreateFoldersOnServer="true" iscontainer="true" isempty="false">
<menupopup class="menulist-menupopup">
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgNewFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup>
<menuitem label="&newfolderchoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'msgNewFolderPicker')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanCreateFoldersOnServer="false"/>
<!-- no subfolders for some inboxes -->
<rule nc:CanCreateSubfolders="false" iscontainer="true" isempty="true">
<menupopup>
<menuitem disabled="true" uri="..." class="folderMenuItem menuitem-iconic" label="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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
<rule nc:CanCreateSubfolders="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgNewFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&renamefolderclickhere.label;" uri=""
id="msgRenameFolderPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanRename="true" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgRenameFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup">
<menuitem label="&renamefolderchoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'msgRenameFolderPicker')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanRename="false" nc:ServerType="nntp">
<!-- don't show nntp servers in the rename dialog -->
</rule>
<rule nc:CanRename="false" iscontainer="true" isempty="false">
<!-- note, there is no "file here" -->
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgRenameFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup"/>
</menu>
</menupopup>
</rule>
<!-- this makes the special folders that you can't rename
like TRASH and INBOX show up, but they are disabled -->
<rule nc:CanRename="false" iscontainer="true" isempty="true">
<menupopup>
<menuitem disabled="true" uri="..." class="folderMenuItem menuitem-iconic" label="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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
<rule nc:CanRename="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgRenameFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&choosefolderclickhere.label;" uri="" id="msgFccFolderPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgFccFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup">
<menuitem label="&filemessageschoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'msgFccFolderPicker')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessagesOnServer="false">
<!-- don't show servers (nntp & any others) which does not allow message filing -->
</rule>
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
<!-- note, there is no "file here" -->
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgFccFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup"/>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessages="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgFccFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&choosefolderclickhere.label;" uri=""
id="msgDraftsFolderPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgDraftsFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup">
<menuitem label="&filemessageschoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'msgDraftsFolderPicker')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessagesOnServer="false">
<!-- don't show servers (nntp & any others) which does not allow message filing -->
</rule>
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
<!-- note, there is no "file here" -->
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgDraftsFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup"/>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessages="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgDraftsFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&choosefolderclickhere.label;" uri=""
id="msgStationeryFolderPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgStationeryFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup">
<menuitem label="&filemessageschoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'msgStationeryFolderPicker')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessagesOnServer="false">
<!-- don't show servers (nntp & any others) which does not allow message filing -->
</rule>
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
<!-- note, there is no "file here" -->
<menupopup>
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgStationeryFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
<menupopup class="menulist-menupopup"/>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessages="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgStationeryFolderPicker')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&chooseaccountclickhere.label;"
uri="" id="msgFccAccountPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:IsServer="true" nc:CanCreateFoldersOnServer="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic"
label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgFccAccountPicker')"
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
CanCreateFoldersOnServer="rdf:http://home.netscape.com/NC-rdf#CanCreateFoldersOnServer"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&chooseaccountclickhere.label;"
uri="" id="msgDraftsAccountPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:IsServer="true" nc:CanCreateFoldersOnServer="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic"
label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgDraftsAccountPicker')"
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
CanCreateFoldersOnServer="rdf:http://home.netscape.com/NC-rdf#CanCreateFoldersOnServer"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist label="&chooseaccountclickhere.label;"
uri="" id="msgStationeryAccountPicker"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:IsServer="true" nc:CanCreateFoldersOnServer="true">
<menupopup>
<menuitem uri="..." class="folderMenuItem menuitem-iconic"
label="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="PickedMsgFolder(event.target,'msgStationeryAccountPicker')"
IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
CanCreateFoldersOnServer="rdf:http://home.netscape.com/NC-rdf#CanCreateFoldersOnServer"/>
</menupopup>
</rule>
</template>
<menupopup />
</menulist>
<menulist id="searchableFolders"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule iscontainer="true" isempty="false" nc:CanSearchMessages="true">
<menupopup>
<menu uri="..."
class="folderMenuItem menu-iconic"
oncommand="onChooseFolder(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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup class="menulist-menupopup">
<menuitem label="&filemessageschoosethis.label;"
oncommand="onChooseFolder(event.target.parentNode.parentNode)"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanSearchMessages="true">
<menupopup>
<menuitem uri="..." value="..."
class="folderMenuItem menuitem-iconic"
oncommand="onChooseFolder(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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</menupopup>
</rule>
</template>
</menulist>
<menulist id="actionTargetFolder"
containment="http://home.netscape.com/NC-rdf#child"
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending"
datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
ref="msgaccounts:/">
<template>
<rule nc:CanFileMessagesOnServer="false">
<!-- don't show servers (nntp & any others) which does not allow message filing -->
</rule>
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..."
class="folderMenuItem menu-iconic"
oncommand="PickedMsgFolder(event.target,'actionTargetFolder')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup class="menulist-menupopup">
<menuitem label="&filemessageschoosethis.label;"
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'actionTargetFolder')"/>
<menuseparator/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
<menupopup>
<menu uri="..."
class="folderMenuItem menu-iconic"
oncommand="PickedMsgFolder(event.target,'actionTargetFolder')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup class="menulist-menupopup"/>
</menu>
</menupopup>
</rule>
<rule nc:CanFileMessages="true">
<menupopup>
<menuitem uri="..." value="..."
class="folderMenuItem menuitem-iconic"
oncommand="PickedMsgFolder(event.target,'actionTargetFolder')"
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"
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</menupopup>
</rule>
</template>
<menupopup/>
</menulist>
</overlay>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,145 +0,0 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!DOCTYPE window SYSTEM "chrome://messenger/locale/msgHdrViewOverlay.dtd">
<?xml-stylesheet href="chrome://messenger/skin/messageHeader.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/messageKeywords.css" type="text/css"?>
<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://messenger/content/msgHdrViewAddresses.js"/>
<script src="chrome://messenger/content/msgHdrViewOverlay.js"/>
<!-- drag and drop -->
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<popup id="attachmentListContext" onpopupshowing="return onShowAttachmentContextMenu();">
<menuitem id="context-openAttachment" label="&openAttachmentCmd.label;" accesskey="&openAttachmentCmd.accesskey;"
oncommand="handleAttachmentSelection('openAttachment');"/>
<menuitem id="context-saveAttachment" label="&saveAsAttachmentCmd.label;" accesskey="&saveAsAttachmentCmd.accesskey;"
oncommand="handleAttachmentSelection('saveAttachment');"/>
<menuseparator/>
<menuitem id="context-saveAllAttachments" oncommand="SaveAllAttachments();" label="&saveAllAttachmentsCmd.label;" accesskey="&saveAllAttachmentsCmd.accesskey;"/>
</popup>
<popup id="attachmentMenuList">
<menuseparator/>
<menuitem label="&saveAllAttachmentsCmd.label;" accesskey="&saveAllAttachmentsCmd.accesskey;" oncommand="SaveAllAttachments();"/>
</popup>
<tooltip id="attachmentListTooltip"
onpopupshowing="return FillInAttachmentTooltip(document.tooltipNode);"/>
<hbox id="msgHeaderView" originalclass="none" persist="state">
<grid id="collapsedHeaderView" class="header-part1" originalclass="header-part1" flex="1" collapsed="true">
<rows>
<row flex="1"/>
</rows>
<columns>
<column class="collapsedToggleHdrBox">
<hbox align="start">
<image id="toggleHeaderView" class="collapsedHeaderViewButton"
onclick="ToggleHeaderView();"/>
</hbox>
</column>
<column id="collapsedsubjectBox" collapsed="true" flex="1">
<hbox align="start">
<label class="collapsedHeaderDisplayName" value="&subjectField.label;"/>
<label id="collapsedsubjectValue" class="collapsedHeaderValue" crop="right" flex="1"/>
</hbox>
</column>
<column id="collapsedfromBox" collapsed="true">
<hbox align="start">
<label class="collapsedHeaderDisplayName" value="&fromField.label;"/>
<mail-emailaddress id="collapsedfromValue" flex="1"/>
</hbox>
</column>
<column id = "collapseddateBox" collapsed="true">
<hbox align="start">
<label id="collapseddateValue" class="collapsedHeaderValue"/>
</hbox>
</column>
<column id="collapsedKeywordBox">
<hbox align="start">
<image id="collapsedKeywordImage" originalclass="none"/>
</hbox>
</column>
<column id="collapsedAttachmentBox" collapsed="true">
<hbox align="start">
<image id="collapsedAttachment" class="collapsedAttachmentButton" onclick="ToggleHeaderView();" />
</hbox>
</column>
</columns>
</grid>
<hbox id="expandedHeaderView" class="header-part1" originalclass="header-part1" flex="1" collapsed="true">
<vbox id="expandedHeaders" flex="1">
<mail-toggle-headerfield id="expandedsubjectBox" class="subjectvalue" label="&subjectField.label;" ontwistyclick="ToggleHeaderView();" collapsed="true"/>
<mail-emailheaderfield id="expandedfromBox" label="&fromField.label;" collapsed="true"/>
<mail-emailheaderfield id="expandedreply-toBox" label="&replyToField.label;" collapsed="true"/>
<mail-headerfield id="expandeddateBox" label="&dateField.label;" collapsed="true"/>
<mail-multi-emailHeaderField id="expandedtoBox" label="&toField.label;" collapsed="true"/>
<mail-multi-emailHeaderField id="expandedccBox" label="&ccField.label;" collapsed="true"/>
<mail-multi-emailHeaderField id="expandedbccBox" label="&bccField.label;" collapsed="true"/>
<mail-headerfield id="expandednewsgroupsBox" label="&newsgroupsField.label;" collapsed="true"/>
<mail-headerfield id="expandedfollowup-toBox" label="&followupToField.label;" collapsed="true"/>
<mail-headerfield id="expandeduser-agentBox" label="&userAgentField.label;" collapsed="true"/>
</vbox>
<vbox id="expandedKeywordBox">
<spacer flex="1"/>
<image id="expandedKeywordImage" originalclass="none" />
<spacer flex="1"/>
</vbox>
<vbox id="editMessageBox" class="header-part1" originalclass="header-part1" collapsed="true">
<spacer flex="1"/>
<button id="editMessageButton" label="&editMessage.label;" oncommand="MsgComposeDraftMessage()"/>
<spacer flex="1"/>
</vbox>
<vbox id="expandedAttachmentBox" class="header-part1" originalclass="header-part1" collapsed="true">
<label id="attachmentText" value="&attachmentsTree.label;" crop="right"/>
<listbox id="attachmentList" flex="2"
onclick="attachmentListClick(event);" ondraggesture="nsDragAndDrop.startDrag(event,attachmentAreaDNDObserver);" ondragover="nsDragAndDrop.dragOver(event, attachmentAreaDNDObserver);" context="attachmentListContext"/>
</vbox>
</hbox>
</hbox>
</overlay>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -24,7 +24,8 @@
*
*/
var gSearchSession;
var gSearchSession = null;
var gPreQuickSearchView = null;
var gSearchTimer = null;
var gViewSearchListener;
var gNumOfSearchHits = 0;
@ -33,6 +34,8 @@ var gStatusBar = null;
var gSearchInProgress = false;
var gSearchInput = null;
var gClearButton = null;
var gDefaultSearchViewTerms = null;
var gQSViewIsDirty = false;
// nsIMsgSearchNotify object
var gSearchNotificationListener =
@ -94,11 +97,35 @@ function removeListeners()
gSearchSession.unregisterListener(gViewSearchListener);
}
function removeGlobalListeners()
{
removeListeners();
gSearchSession.removeFolderListener(folderListener);
gSearchSession.unregisterListener(gSearchNotificationListener);
}
function initializeGlobalListeners()
{
gSearchSession.addFolderListener(folderListener);
// Setup the javascript object as a listener on the search results
gSearchSession.registerListener(gSearchNotificationListener);
}
function createQuickSearchView()
{
if(gDBView.viewType != nsMsgViewType.eShowQuickSearchResults) //otherwise we are already in quick search view
{
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView); //clear selection
treeView.selection.clearSelection();
gPreQuickSearchView = gDBView;
CreateDBView(gDBView.msgFolder, nsMsgViewType.eShowQuickSearchResults, nsMsgViewFlagsType.kNone, gDBView.sortType, gDBView.sortOrder);
}
}
function initializeSearchBar()
{
if (!gDBView)
return;
createQuickSearchView();
if (!gSearchSession)
{
getDocumentElements();
@ -115,56 +142,100 @@ function initializeSearchBar()
}
removeListeners();
}
addListeners();
}
function onEnterInSearchBar()
{
initializeSearchBar();
if (gSearchInput.value == "")
{
var searchView = gDBView.isSearchView;
if (searchView)
if (gDBView.viewType == nsMsgViewType.eShowQuickSearchResults)
{
statusFeedback.showStatusString("");
disableQuickSearchClearButton();
gDBView.reloadFolderAfterQuickSearch(); // that should have initialized gDBView
if (gDefaultSearchViewTerms)
{
if (gQSViewIsDirty)
{
initializeSearchBar();
onSearch(gDefaultSearchViewTerms);
}
}
else
restorePreSearchView();
}
gQSViewIsDirty = false;
return;
}
else
gClearButton.setAttribute("disabled", false); //coming into search enable clear button
initializeSearchBar();
gClearButton.setAttribute("disabled", false); //coming into search enable clear button
ClearThreadPaneSelection();
ClearMessagePane();
onSearch(null);
gQSViewIsDirty = false;
}
function initializeGlobalListeners()
function restorePreSearchView()
{
gSearchSession.addFolderListener(folderListener);
// Setup the javascript object as a listener on the search results
gSearchSession.registerListener(gSearchNotificationListener);
var selectedHdr = null;
//save selection
try
{
selectedHdr = gDBView.hdrForFirstSelectedMessage;
}
catch (ex)
{}
//we might have to sort the view coming out of quick search
var sortType = gDBView.sortType;
var sortOrder = gDBView.sortOrder;
var viewFlags = gDBView.viewFlags;
var folder = gDBView.msgFolder;
gDBView.close();
gDBView = null;
if (gPreQuickSearchView)
{
gDBView = gPreQuickSearchView;
if (sortType != gDBView.sortType || sortOrder != gDBView.sortOrder)
{
gDBView.sort(sortType, sortOrder);
UpdateSortIndicators(sortType, sortOrder);
}
gPreQuickSearchView = null;
}
else //create default view type
CreateDBView(folder, nsMsgViewType.eShowAllThreads, viewFlags, sortType, sortOrder);
RerootThreadPane();
//now restore selection
if (selectedHdr)
{
gDBView.selectMsgByKey(selectedHdr.messageKey);
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView);
var selectedIndex = treeView.selection.currentIndex;
if (selectedIndex >= 0) //scroll
EnsureRowInThreadTreeIsVisible(selectedIndex);
else
ClearMessagePane();
}
else
ScrollToMessage(nsMsgNavigationType.firstNew, true, false /* selectMessage */);
}
function removeGlobalListeners()
{
removeListeners();
gSearchSession.removeFolderListener(folderListener);
gSearchSession.unregisterListener(gSearchNotificationListener);
}
function onSearch(aSearchTerms)
{
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView);
if (treeView)
{
var tree = GetThreadTree();
tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject).view = treeView;
}
RerootThreadPane();
if (aSearchTerms)
createSearchTermsWithList(aSearchTerms);
@ -197,17 +268,10 @@ function createSearchTermsWithList(aTermsArray)
gSearchSession.addScopeTerm(nsMsgSearchScope.offlineMail, selectedFolder);
// add each item in termsArray to the search session
var isupports = null;
var searchTerm;
var termsArray = aTermsArray.QueryInterface(Components.interfaces.nsISupportsArray);
for (var i = 0; i < termsArray.Count(); i++)
{
isupports = termsArray.GetElementAt(i);
searchTerm = isupports.QueryInterface(Components.interfaces.nsIMsgSearchTerm);
gSearchSession.appendTerm(searchTerm);
}
gSearchSession.appendTerm(termsArray.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgSearchTerm));
}
function createSearchTerms()
@ -245,6 +309,21 @@ function createSearchTerms()
term.op = nsMsgSearchOp.Contains;
term.booleanAnd = false;
searchTermsArray.AppendElement(term);
// now append the default view criteria to the quick search so we don't lose any default
// view information
if (gDefaultSearchViewTerms)
{
var isupports = null;
var searchTerm;
var termsArray = gDefaultSearchViewTerms.QueryInterface(Components.interfaces.nsISupportsArray);
for (var i = 0; i < termsArray.Count(); i++)
{
isupports = termsArray.GetElementAt(i);
searchTerm = isupports.QueryInterface(Components.interfaces.nsIMsgSearchTerm);
searchTermsArray.AppendElement(searchTerm);
}
}
createSearchTermsWithList(searchTermsArray);
@ -289,9 +368,7 @@ function onSearchInput(returnKeyHit)
function onClearSearch()
{
if (gSearchInput)
gSearchInput.value =""; //on input does not get fired for some reason
onSearchInput(true);
Search("");
}
function disableQuickSearchClearButton()
@ -299,3 +376,14 @@ function disableQuickSearchClearButton()
if (gClearButton)
gClearButton.setAttribute("disabled", true); //going out of search disable clear button
}
function Search(str)
{
GetSearchInput();
if (str != gSearchInput.value)
gQSViewIsDirty = true;
gSearchInput.value = str; //on input does not get fired for some reason
onSearchInput(true);
}

Просмотреть файл

@ -126,7 +126,8 @@ Rights Reserved.
<treerow>
<treecell label="?LeafName" properties="ServerType-?ServerType"/>
<treecell properties="Subscribed-?Subscribed"/>
<treecell label="?TotalMessages"/>
<!-- commenting out until bug 38906 is fixed
<treecell label="?TotalMessages"/> -->
</treerow>
</treeitem>
</treechildren>
@ -137,10 +138,13 @@ Rights Reserved.
<treecols id="theSubscribeColumns">
<treecol id="nameColumn" persist="hidden" flex="1" primary="true" label="..."
sort="?LeafName"/>
<splitter class="tree-splitter"/>
<treecol id="subscribedColumn" persist="hidden" label="&subscribedHeader.label;"
sort="?Subscribed"/>
<!-- commenting out until bug 38906 is fixed
<splitter class="tree-splitter"/>
<treecol id="messagesColumn" persist="hidden" label="&messagesHeader.label;"
sort="?TotalMessages"/>
sort="?TotalMessages"/> -->
</treecols>
</tree>
</hbox>
@ -151,8 +155,11 @@ Rights Reserved.
onclick="SearchOnClick(event);">
<treecols>
<treecol id="nameColumn2" persist="hidden" flex="1" primary="true" label="..." />
<splitter class="tree-splitter"/>
<treecol id="subscribedColumn2" persist="hidden" label="&subscribedHeader.label;" />
<treecol id="messagesColumn2" persist="hidden" label="&messagesHeader.label;" />
<!-- commenting out until bug 38906 is fixed
<splitter class="tree-splitter"/>
<treecol id="messagesColumn2" persist="hidden" label="&messagesHeader.label;" /> -->
</treecols>
<treechildren id="searchTreeBody"/>
</tree>

Просмотреть файл

@ -107,6 +107,8 @@ Rights Reserved.
<!ENTITY spamFiltersCmd.accesskey "J">
<!ENTITY filtersCmd.label "Message Filters...">
<!ENTITY filtersCmd.accesskey "F">
<!ENTITY filtersApply.label "Run Filters on Selected Folder">
<!ENTITY filtersApply.accesskey "R">
<!ENTITY folderPropsCmd.label "Properties...">
<!ENTITY folderPropsFolderCmd.label "Folder Properties...">
<!ENTITY folderPropsNewsgroupCmd.label "Newsgroup Properties...">
@ -157,6 +159,8 @@ Rights Reserved.
<!ENTITY sortByStatusCmd.accesskey "u">
<!ENTITY sortByLabelCmd.label "Label">
<!ENTITY sortByLabelCmd.accesskey "L">
<!ENTITY sortByScoreCmd.label "Junk Score">
<!ENTITY sortByScoreCmd.accesskey "C">
<!ENTITY sortBySubjectCmd.label "Subject">
<!ENTITY sortBySubjectCmd.accesskey "S">
<!-- Sender / Recipient lives in messenger.properties, since that item is dynamic -->
@ -228,6 +232,11 @@ Rights Reserved.
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findAgainCmd.key "g">
<!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findPrevCmd.label "Find Previous">
<!ENTITY findPrevCmd.accesskey "v">
<!ENTITY findPrevCmd.key "g">
<!ENTITY findPrevCmd.key2 "VK_F3">
<!-- LOCALIZATION NOTE (searchCurrentCmd.label) : Do not translate "&lt;" and "&gt;" in below line. -->
<!ENTITY searchCurrentCmd.label ".Search in &lt;current&gt;">
<!ENTITY searchCurrentCmd.accesskey "">
@ -387,6 +396,7 @@ Rights Reserved.
<!ENTITY markButton.label "Mark">
<!ENTITY printButton.label "Print">
<!ENTITY stopButton.label "Stop">
<!ENTITY junkButton.label "Junk">
<!--Tooltips-->
<!ENTITY menuBar.tooltip "Menu Bar">
@ -405,6 +415,7 @@ Rights Reserved.
<!ENTITY printButton.tooltip "Print this message">
<!ENTITY stopButton.tooltip "Stop the current transfer">
<!ENTITY throbber.tooltip "Go to the &vendorShortName; home page">
<!ENTITY junkButton.tooltip "Mark the selected messages as junk (or not junk)">
<!-- Statusbar -->
<!ENTITY statusText.label "Done">
@ -499,40 +510,6 @@ Rights Reserved.
<!ENTITY searchAddressesCmd.label "Search Addresses...">
<!ENTITY searchAddressesCmd.accesskey "S">
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsMenu.accesskey "T">
<!ENTITY threadColumn.label "Thread">
<!ENTITY senderColumn.label "Sender">
<!ENTITY subjectColumn.label "Subject">
<!ENTITY dateColumn.label "Date">
<!ENTITY priorityColumn.label "Priority">
<!ENTITY labelColumn.label "Label">
<!ENTITY statusColumn.label "Status">
<!ENTITY sizeColumn.label "Size">
<!ENTITY linesColumn.label "Lines">
<!ENTITY unreadColumn.label "Unread">
<!ENTITY totalColumn.label "Total">
<!ENTITY orderReceivedColumn.label "Order Received">
<!ENTITY readColumn.label "Read">
<!ENTITY flagColumn.label "Flag">
<!ENTITY locationColumn.label "Location">
<!--Tooltips-->
<!ENTITY threadColumnHeader.tooltip "Click to display message threads">
<!ENTITY columnChooser.tooltip "Click to select columns to display">
<!ENTITY nameColumn.label "Name">
<!ENTITY unreadColumn.label "Unread">
<!ENTITY totalColumn.label "Total">
<!ENTITY accounts.label "Accounts">
<!-- LOCALIZATION NOTE (accounts.img) : DONT_TRANSLATE -->
<!ENTITY accounts.img "chrome://messenger/skin/local-mailhost.gif">
<!ENTITY newMessageCmd.key "M">
<!ENTITY textZoomEnlargeCmd.label "Increase Text Size">
<!ENTITY textZoomEnlargeCmd.accesskey "I">
<!ENTITY textZoomEnlargeCmd.commandkey "+">
<!ENTITY textZoomEnlargeCmd.commandkey2 "="> <!-- + is above this key on many keyboards -->
<!ENTITY textZoomReduceCmd.label "Decrease Text Size">
<!ENTITY textZoomReduceCmd.accesskey "D">
<!ENTITY textZoomReduceCmd.commandkey "-">
<!ENTITY junkMailCmd.label "Junk Mail Controls...">
<!ENTITY junkMailCmd.accesskey "J">

Просмотреть файл

@ -1,225 +0,0 @@
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Seth Spitzer <sspitzer@netscape.com>
#
#
# The following are used by the messenger application
#
renameAccount=Rename Account...
renameNewsAccount=Rename News Account...
renameFolder=Rename Folder...
compactFolder=Compact This Folder
removeAccount=Delete Account...
removeNewsAccount=Delete News Account...
removeFolder=Delete Folder
newFolder=New Folder...
newSubfolder=New Subfolder...
folderProperties=Folder Properties
getNextNMessages=Get Next %S News Messages
advanceNextPrompt=Advance to next unread message in %S?
titleNewsPreHost=on
titleMailPreHost=for
replyToSender=Reply to Sender
reply=Reply
# LOCALIZATION NOTES(HTMLFiles): Only translate "Files" in the line below
HTMLFiles=HTML Files (*.htm, *.html, *.shtml)
# LOCALIZATION NOTES(TextFiles): Do not translate "*.txt" in the line below
TextFiles=Text Files (*.txt)
# LOCALIZATION NOTES(TextFiles): Do not translate "*.eml" in the line below
EMLFiles=Mail Files (*.eml)
# LOCALIZATION NOTES(defaultSaveMessageAsFileName): Do not translate ".eml"
# in the line below. Also, the complete file name should 8.3
defaultSaveMessageAsFileName=message.eml
SaveMailAs=Save Message As
SaveAttachment=Save Attachment
SaveAllAttachments=Save All Attachments
LoadingMessageToPrint=Loading message to print...
MessageLoaded=Message loaded...
PrintingMessage=Printing message...
PrintingComplete=Printing complete.
saveAttachmentFailed=Unable to save the attachment. Please check your file name and try again later.
saveMessageFailed=Unable to save the message. Please check your file name and try again later.
notDownloaded=(Not Downloaded)
fileExists=%S already exists. Do you want to replace it?
downloadingNewsgroups=Downloading Newsgroups for Offline Use
downloadingMail=Downloading Mail for Offline Use
sendingUnsent=Sending Unsent Messages
folderExists=A folder with that name already exists. Please enter a different name.
compactingFolder=Compacting folder %S...
autoCompactAllFolders=Do you wish to compact all local and offline folders to save disk space?
confirmFolderDeletionForFilter=Deleting the folder '%S' will disable its associated filter(s). Are you sure you want to delete the folder?
alertFilterChanged=Filters associated with this folder will be updated.
filterDisabled=The folder '%S' could not be found, so filter(s) associated with this folder will be disabled. Verify that the folder exists, and that filters point to a valid destination folder.
filterFolderDeniedLocked=The messages could not be filtered to folder '%S' because another operation is in progress.
alertFilterCheckbox=Do not warn me again.
compactFolderDeniedLock=The folder '%S' cannot be compacted because another operation is in progress. Please try again later.
compactFolderWriteFailed=The folder '%S' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
filterFolderWriteFailed=The messages could not be filtered to folder '%S' because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
copyMsgWriteFailed=The messages could not be moved or copied to folder '%S' because writing to folder failed. To gain disk space, from the File menu, first choose Empty Trash, and then choose Compact Folders, and then try again.
cantMoveMsgWOBodyOffline=While working offline, you cannot move or copy messages that were not downloaded for offline use. From the Mail window, open the File menu, choose Offline, then choose Work Online, and then try again.
folderRenameFailed=The folder could not be renamed. Perhaps the folder is being reparsed, or the new name is not a valid folder name.
# LOCALIZATION NOTES(verboseFolderFormat): %1$S is folder name, %2$S is server name
verboseFolderFormat=%1$S on %2$S
defaultServerTag=(Default)
useDefaultServer=Use default server
# LOCALIZATION NOTES(serverType-nntp): Do not translate "NNTP" in the line below
serverType-nntp=News Server (NNTP)
# LOCALIZATION NOTES(serverType-pop3): Do not translate "POP" in the line below
serverType-pop3=POP Mail Server
# LOCALIZATION NOTES(serverType-imap): Do not translate "IMAP" in the line below
serverType-imap=IMAP Mail Server
serverType-none=Local Mail Store
# LOCALIZATION NOTES(serverType-movemail): DONT_TRANSLATE
serverType-movemail=Unix Movemail
# used in the column and in the "View | Sort By " menu
recipientColumnHeader=Recipient
recipientAccessKey=r
senderColumnHeader=Sender
senderAccessKey=r
sizeColumnHeader=Size
linesColumnHeader=Lines
# status feedback stuff
documentDone=Done
documentLoading=Loading Document...
unreadMsgStatus=Unread: %S
totalMsgStatus=Total: %S
# localized folder names
localFolders=Local Folders
# LOCALIZATION NOTES (inboxFolderName): OK to translate all foldernames, bugzilla #57440 & bugzilla #23625 fixed
inboxFolderName=Inbox
trashFolderName=Trash
sentFolderName=Sent
draftsFolderName=Drafts
templatesFolderName=Templates
unsentFolderName=Unsent Messages
# Error message for special folder deletion on imap accounts
# LOCALIZATION NOTES (specialFolderDeletionErr): Do not translate "IMAP" in the line below
specialFolderDeletionErr=Deletion of special folder %S is not allowed for IMAP accounts.
specialFolderDeletionErrTitle=Special Folder Deletion
# "Normal" priority is often blank,
# depending on the consumers of these strings
priorityLowest=Lowest
priorityLow=Low
priorityNormal=Normal
priorityHigh=High
priorityHighest=Highest
# defaults for labels prefs listed in mailnews.js
mailnews.labels.description.0=None
mailnews.labels.description.1=Important
mailnews.labels.description.2=Work
mailnews.labels.description.3=Personal
mailnews.labels.description.4=To Do
mailnews.labels.description.5=Later
# Format definition for label menu text. This is necessary in order to
# get the access key to be the on the first character of the menu text
# instead of after the menu text. The access keys for each of the label
# items have been set to be the number preceeding '%S' listed below.
#
# '%S' is the prefs defined above, mailnews.labels.description.X.
# ie: 0 None
# 1 Important
# 2 Work
# 3 Personal
# 4 To Do
# 5 Later
labelMenuItemFormat0=0 %S
labelMenuItemFormat1=1 %S
labelMenuItemFormat2=2 %S
labelMenuItemFormat3=3 %S
labelMenuItemFormat4=4 %S
labelMenuItemFormat5=5 %S
replied=Replied
forwarded=Forwarded
new=New
read=Read
# mailnews.js
mailnews.send_default_charset=ISO-8859-1
mailnews.view_default_charset=ISO-8859-1
# offline msg
nocachedbodybody =The body of this message has not been downloaded from \
the server for reading offline. To read this message, \
you must reconnect to the network, choose Offline from \
the File menu and then select Work Online.\
In the future, you can select which messages or folders to read offline. To do \
this, choose Offline from the file menu and then select Synchronize. You can \
adjust the Disk Space preference to prevent the downloading of large messages.
# accountCentral
mailnews.account_central_page.url=chrome://messenger/content/msgAccountCentral.xul
# LOCALIZATION NOTES(acctCentralTitleFormat): %1$S is brand, %2$S is account type, %3$S is account name
acctCentralTitleFormat=%1$S %2$S - %3$S
mailAcctType=Mail
newsAcctType=News
# LOCALIZATION NOTES(nocachedbodytitle): Do not translate "<TITLE>" or "</TITLE>" in the line below
nocachedbodytitle=<TITLE>Go Online to View This Message</TITLE>\n\
# mailWindowOverlay.js
confirmUnsubscribeTitle=Confirm Unsubscribe
confirmUnsubscribeText=Are you sure you want to unsubscribe from %S?
cannotHaveTwoFilterRulesDialogs=Filter Rules Dialog
cannotHaveTwoFilterRulesText=The filter cannot be created because the Filter Rules dialog is already in use. Please close the dialog and try again.
# msgHdrViewOverlay.js
openLabel=Open
openLabelAccesskey=O
saveLabel=Save As...
saveLabelAccesskey=A
# This is the format for prepending accesskeys to the
# each of the attachments in the file|attachments menu:
# ie: 1 file.txt
# 2 another file.txt
attachmentDisplayNameFormat=%S %S
# Connection Error Messages
101=Unknown Error
102=Failed to connect to server %S.
103=Could not connect to server %S; the connection was refused.
104=Connection to server %S timed out.
recipientSearchCriteria=Subject or Recipient contains:
senderSearchCriteria=Subject or Sender contains:
# LOCALIZATION NOTES(biffNotification): %1$S is a user name %2$S is the number of new messages
biffNotification_message=%1$S has %2$S new message
biffNotification_messages=%1$S has %2$S new messages
newMail_Alert_Title=New Messages

Просмотреть файл

@ -1,38 +0,0 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Stephen Donner <stephend@netscape.com>
-->
<!ENTITY emailSectionHdr.label "Email">
<!ENTITY readMsgsLink.label "Read messages">
<!ENTITY composeMsgLink.label "Compose a new message">
<!ENTITY newsSectionHdr.label "Newsgroups">
<!ENTITY subscribeNewsLink.label "Subscribe to newsgroups">
<!ENTITY accountsSectionHdr.label "Accounts">
<!ENTITY settingsLink.label "View settings for this account">
<!ENTITY newAcctLink.label "Create a new account">
<!ENTITY advFeaturesSectionHdr.label "Advanced Features">
<!ENTITY searchMsgsLink.label "Search messages">
<!ENTITY filtersLink.label "Create message filters">
<!ENTITY offlineLink.label "Offline settings">

Просмотреть файл

@ -1,35 +0,0 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!ENTITY subscribeDialog.title "Subscribe">
<!ENTITY subscribeButton.label "Subscribe">
<!ENTITY subscribeButton.accesskey "S">
<!ENTITY unsubscribeButton.label "Unsubscribe">
<!ENTITY unsubscribeButton.accesskey "U">
<!ENTITY refreshButton.label "Refresh">
<!ENTITY refreshButton.accesskey "R">
<!ENTITY stopButton.label "Stop">
<!ENTITY stopButton.accesskey "T">
<!ENTITY server.label "Account:">
<!ENTITY server.accesskey "A">
<!ENTITY subscribedHeader.label "Subscribe">
<!ENTITY messagesHeader.label "Messages">
<!ENTITY namefield.label "Show items that contain:">
<!ENTITY namefield.accesskey "O">