зеркало из https://github.com/mozilla/pjs.git
remove tabs and some trailing white space from thunderbird's xul and js files.
purely white space changes.
This commit is contained in:
Родитель
b77936e371
Коммит
54d6667b4f
|
@ -59,11 +59,11 @@ var gCurrentServerURI = null;
|
|||
var gStatusFeedback = {
|
||||
progressMeterVisible : false,
|
||||
|
||||
showStatusString: function(status)
|
||||
showStatusString: function(status)
|
||||
{
|
||||
gStatusText.setAttribute("value", status);
|
||||
},
|
||||
startMeteors: function()
|
||||
startMeteors: function()
|
||||
{
|
||||
// change run button to be a stop button
|
||||
gRunFiltersButton.setAttribute("label", gRunFiltersButton.getAttribute("stoplabel"));
|
||||
|
@ -71,13 +71,13 @@ var gStatusFeedback = {
|
|||
|
||||
if (!this.progressMeterVisible)
|
||||
{
|
||||
document.getElementById('statusbar-progresspanel').removeAttribute('collapsed');
|
||||
document.getElementById('statusbar-progresspanel').removeAttribute('collapsed');
|
||||
this.progressMeterVisible = true;
|
||||
}
|
||||
|
||||
gStatusBar.setAttribute("mode", "undetermined");
|
||||
},
|
||||
stopMeteors: function()
|
||||
stopMeteors: function()
|
||||
{
|
||||
try {
|
||||
// change run button to be a stop button
|
||||
|
@ -86,7 +86,7 @@ var gStatusFeedback = {
|
|||
gStatusBar.setAttribute("mode", "normal");
|
||||
|
||||
if (this.progressMeterVisible)
|
||||
{
|
||||
{
|
||||
document.getElementById('statusbar-progresspanel').collapsed = true;
|
||||
this.progressMeterVisible = true;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ function onCancel()
|
|||
var firstItem = getSelectedServerForFilters();
|
||||
if (!firstItem)
|
||||
firstItem = getServerThatCanHaveFilters();
|
||||
|
||||
|
||||
if (firstItem) {
|
||||
var resource = gRDF.GetResource(firstItem);
|
||||
var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
@ -185,7 +185,7 @@ function onFilterServerClick(selection)
|
|||
// Save the current filters to disk before switching because
|
||||
// the dialog may be closed and we'll lose current filters.
|
||||
var filterList = currentFilterList();
|
||||
if (filterList)
|
||||
if (filterList)
|
||||
filterList.saveToDefaultFile();
|
||||
|
||||
selectServer(itemURI);
|
||||
|
@ -212,8 +212,8 @@ function setServer(uri)
|
|||
var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
||||
//Calling getFilterList will detect any errors in rules.dat, backup the file, and alert the user
|
||||
//we need to do this because gFilterTree.setAttribute will cause rdf to call getFilterList and there is
|
||||
//no way to pass msgWindow in that case.
|
||||
//we need to do this because gFilterTree.setAttribute will cause rdf to call getFilterList and there is
|
||||
//no way to pass msgWindow in that case.
|
||||
|
||||
if (msgFolder)
|
||||
msgFolder.getFilterList(gFilterListMsgWindow);
|
||||
|
@ -222,10 +222,10 @@ function setServer(uri)
|
|||
msgFolder = msgFolder.server.rootMsgFolder;
|
||||
var rootFolderUri = msgFolder.URI;
|
||||
rebuildFilterTree(uri);
|
||||
|
||||
|
||||
// root the folder picker to this server
|
||||
gRunFiltersFolderPicker.setAttribute("ref", rootFolderUri);
|
||||
|
||||
|
||||
// run filters after the fact not supported by news
|
||||
if (CanRunFiltersAfterTheFact(msgFolder.server)) {
|
||||
gRunFiltersFolderPicker.removeAttribute("hidden");
|
||||
|
@ -270,7 +270,7 @@ function selectServer(uri)
|
|||
{
|
||||
// update the server menu
|
||||
var serverMenu = document.getElementById("serverMenu");
|
||||
|
||||
|
||||
var resource = gRDF.GetResource(uri);
|
||||
var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
||||
|
@ -303,7 +303,7 @@ function currentFilter()
|
|||
var currentIndex = gFilterTree.currentIndex;
|
||||
if (currentIndex == -1)
|
||||
return null;
|
||||
|
||||
|
||||
var filter;
|
||||
|
||||
try {
|
||||
|
@ -327,7 +327,7 @@ function onFilterSelect(event)
|
|||
updateButtons();
|
||||
}
|
||||
|
||||
function onEditFilter()
|
||||
function onEditFilter()
|
||||
{
|
||||
var selectedFilter = currentFilter();
|
||||
var curFilterList = currentFilterList();
|
||||
|
@ -343,7 +343,7 @@ function onNewFilter(emailAddress)
|
|||
{
|
||||
var curFilterList = currentFilterList();
|
||||
var args = {filterList: curFilterList};
|
||||
|
||||
|
||||
window.openDialog("chrome://messenger/content/FilterEditor.xul", "FilterEditor", "chrome,modal,titlebar,resizable,centerscreen", args);
|
||||
|
||||
if ("refresh" in args && args.refresh)
|
||||
|
@ -357,8 +357,8 @@ function onDeleteFilter()
|
|||
return;
|
||||
|
||||
var sel = gFilterTree.view.selection, selCount = sel.getRangeCount();
|
||||
if (!selCount ||
|
||||
gPromptService.confirmEx(window, null,
|
||||
if (!selCount ||
|
||||
gPromptService.confirmEx(window, null,
|
||||
gFilterBundle.getString("deleteFilterConfirmation"),
|
||||
gPromptService.STD_YES_NO_BUTTONS,
|
||||
'', '', '', '', {}))
|
||||
|
@ -401,7 +401,7 @@ function onFilterClose()
|
|||
{
|
||||
// make sure to save the filter to disk
|
||||
var filterList = currentFilterList();
|
||||
if (filterList)
|
||||
if (filterList)
|
||||
filterList.saveToDefaultFile();
|
||||
|
||||
if (gRunFiltersButton.getAttribute("label") == gRunFiltersButton.getAttribute("stoplabel")) {
|
||||
|
@ -434,7 +434,7 @@ function runSelectedFilters()
|
|||
gFilterListMsgWindow.StopUrls();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var folderURI = gRunFiltersFolderPicker.getAttribute("uri");
|
||||
var resource = gRDF.GetResource(folderURI);
|
||||
var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
@ -464,7 +464,7 @@ function moveCurrentFilter(motion)
|
|||
{
|
||||
var filterList = currentFilterList();
|
||||
var filter = currentFilter();
|
||||
if (!filterList || !filter)
|
||||
if (!filterList || !filter)
|
||||
return;
|
||||
|
||||
filterList.moveFilter(filter, motion);
|
||||
|
@ -478,9 +478,9 @@ function rebuildFilterTree(uri)
|
|||
gFilterTree.setAttribute("ref", uri);
|
||||
}
|
||||
|
||||
function refresh()
|
||||
function refresh()
|
||||
{
|
||||
if (!gFilterTree)
|
||||
if (!gFilterTree)
|
||||
return;
|
||||
|
||||
var selectedRes;
|
||||
|
@ -515,7 +515,7 @@ function updateButtons()
|
|||
var filter = currentFilter();
|
||||
// "edit" only enabled when one filter selected or if we couldn't parse the filter
|
||||
gEditButton.disabled = !oneFilterSelected || filter.unparseable;
|
||||
|
||||
|
||||
// "delete" only disabled when no filters are selected
|
||||
gDeleteButton.disabled = !numFiltersSelected;
|
||||
|
||||
|
@ -539,7 +539,7 @@ function getSelectedServerForFilters()
|
|||
var firstItem = null;
|
||||
var args = window.arguments;
|
||||
var selectedFolder = args[0].folder;
|
||||
|
||||
|
||||
if (args && args[0] && selectedFolder)
|
||||
{
|
||||
var msgFolder = selectedFolder.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
|
@ -613,18 +613,18 @@ function onFilterClick(event)
|
|||
// we only care about button 0 (left click) events
|
||||
if (event.button != 0)
|
||||
return;
|
||||
|
||||
|
||||
var row = {}, col = {}, childElt = {};
|
||||
var filterTree = document.getElementById("filterTree");
|
||||
filterTree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, childElt);
|
||||
if (row.value == -1 || row.value > filterTree.view.rowCount-1 || event.originalTarget.localName != "treechildren") {
|
||||
if (event.originalTarget.localName == "treecol") {
|
||||
if (event.originalTarget.localName == "treecol") {
|
||||
// clicking on the name column in the filter list should not sort
|
||||
event.stopPropagation();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (col.value.id == "activeColumn") {
|
||||
toggleFilter(filterTree.builderView.getResourceAtIndex(row.value));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0"?>
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
@ -44,12 +44,12 @@
|
|||
%customizeToolbarDTD;
|
||||
]>
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/content/customizeToolbar.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/customizeToolbar.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/addressbook/addressbook.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/smime/msgCompSMIMEOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/addressbook/addressbook.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/smime/msgCompSMIMEOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://messenger/skin/primaryToolbar.css" type="text/css"?>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
|
@ -62,7 +62,7 @@
|
|||
onload="onLoad();"
|
||||
onunload="onUnload();"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return onAccept();"
|
||||
ondialogaccept="return onAccept();"
|
||||
ondialogcancel="return onCancel();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
@ -96,7 +96,7 @@
|
|||
<menuitem value="text" label="&text.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
|
||||
<checkbox id="smallicons" oncommand="updateIconSize(this.checked);" label="&useSmallIcons.label;"/>
|
||||
|
||||
<button label="&restoreDefaultSet.label;" oncommand="restoreDefaultSet();"/>
|
||||
|
|
|
@ -40,28 +40,28 @@ function hiddenWindowStartup()
|
|||
{
|
||||
// Disable menus which are not appropriate
|
||||
var disabledItems = ['newNewMsgCmd', 'menu_newFolder', 'newAccountMenuItem', 'menu_close', 'menu_saveAs',
|
||||
'menu_saveAsFile', 'menu_newVirtualFolder', 'menu_find', 'menu_findCmd', 'menu_findAgainCmd',
|
||||
'menu_sendunsentmsgs', 'menu_subscribe', 'menu_renameFolder', 'menu_select',
|
||||
'menu_selectAll', 'menu_selectThread',
|
||||
'menu_favoriteFolder', 'menu_properties',
|
||||
'menu_Toolbars', 'menu_MessagePaneLayout', 'menu_showMessage', 'menu_FolderViews',
|
||||
'viewSortMenu', 'groupBySort', 'viewMessageViewMenu', 'mailviewCharsetMenu',
|
||||
'viewMessagesMenu', 'menu_expandAllThreads', 'collapseAllThreads',
|
||||
'viewheadersmenu', 'viewBodyMenu', 'viewAttachmentsInlineMenuitem',
|
||||
'viewTextSizeMenu', 'menu_textZoomEnlarge', 'menu_textZoomReduce',
|
||||
'goNextMenu', 'menu_nextMsg', 'menu_nextUnreadMsg', 'menu_nextUnreadThread',
|
||||
'goPreviousMenu', 'menu_prevMsg', 'menu_prevUnreadMsg', 'menu_goForward', 'menu_goBack',
|
||||
'goStartPage', 'newMsgCmd', 'replyMainMenu', 'replySenderMainMenu', 'replyNewsgroupMainMenu',
|
||||
'menu_replyToAll', 'menu_forwardMsg', 'forwardAsMenu', 'menu_editMsgAsNew', 'openMessageWindowMenuitem',
|
||||
'moveMenu', 'copyMenu', 'moveToFolderAgain', 'tagMenu', 'markMenu',
|
||||
'markReadMenuItem', 'menu_markThreadAsRead', 'menu_markReadByDate', 'menu_markAllRead',
|
||||
'markFlaggedMenuItem', 'menu_markAsJunk', 'menu_markAsNotJunk', 'createFilter',
|
||||
'killThread', 'watchThread', 'applyFilters', 'runJunkControls', 'deleteJunk', 'menu_import',
|
||||
'menu_saveAsFile', 'menu_newVirtualFolder', 'menu_find', 'menu_findCmd', 'menu_findAgainCmd',
|
||||
'menu_sendunsentmsgs', 'menu_subscribe', 'menu_renameFolder', 'menu_select',
|
||||
'menu_selectAll', 'menu_selectThread',
|
||||
'menu_favoriteFolder', 'menu_properties',
|
||||
'menu_Toolbars', 'menu_MessagePaneLayout', 'menu_showMessage', 'menu_FolderViews',
|
||||
'viewSortMenu', 'groupBySort', 'viewMessageViewMenu', 'mailviewCharsetMenu',
|
||||
'viewMessagesMenu', 'menu_expandAllThreads', 'collapseAllThreads',
|
||||
'viewheadersmenu', 'viewBodyMenu', 'viewAttachmentsInlineMenuitem',
|
||||
'viewTextSizeMenu', 'menu_textZoomEnlarge', 'menu_textZoomReduce',
|
||||
'goNextMenu', 'menu_nextMsg', 'menu_nextUnreadMsg', 'menu_nextUnreadThread',
|
||||
'goPreviousMenu', 'menu_prevMsg', 'menu_prevUnreadMsg', 'menu_goForward', 'menu_goBack',
|
||||
'goStartPage', 'newMsgCmd', 'replyMainMenu', 'replySenderMainMenu', 'replyNewsgroupMainMenu',
|
||||
'menu_replyToAll', 'menu_forwardMsg', 'forwardAsMenu', 'menu_editMsgAsNew', 'openMessageWindowMenuitem',
|
||||
'moveMenu', 'copyMenu', 'moveToFolderAgain', 'tagMenu', 'markMenu',
|
||||
'markReadMenuItem', 'menu_markThreadAsRead', 'menu_markReadByDate', 'menu_markAllRead',
|
||||
'markFlaggedMenuItem', 'menu_markAsJunk', 'menu_markAsNotJunk', 'createFilter',
|
||||
'killThread', 'watchThread', 'applyFilters', 'runJunkControls', 'deleteJunk', 'menu_import',
|
||||
'searchMailCmd', 'searchAddressesCmd', 'filtersCmd', 'junkMailCmd',
|
||||
'cmd_close', 'minimizeWindow', 'zoomWindow'];
|
||||
'cmd_close', 'minimizeWindow', 'zoomWindow'];
|
||||
var id;
|
||||
var element;
|
||||
for (id in disabledItems)
|
||||
for (id in disabledItems)
|
||||
{
|
||||
element = document.getElementById(disabledItems[id]);
|
||||
if (element)
|
||||
|
|
|
@ -45,61 +45,61 @@ var gMessengerBundle = document.getElementById("bundle_messenger");
|
|||
var FolderPaneController =
|
||||
{
|
||||
supportsCommand: function(command)
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
//case "cmd_selectAll": the folder pane currently only handles single selection
|
||||
case "cmd_cut":
|
||||
case "cmd_copy":
|
||||
case "cmd_paste":
|
||||
return true;
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
//case "cmd_selectAll": the folder pane currently only handles single selection
|
||||
case "cmd_cut":
|
||||
case "cmd_copy":
|
||||
case "cmd_paste":
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
isCommandEnabled: function(command)
|
||||
{
|
||||
isCommandEnabled: function(command)
|
||||
{
|
||||
if (IsFakeAccount())
|
||||
return false;
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_cut":
|
||||
case "cmd_copy":
|
||||
case "cmd_paste":
|
||||
return false;
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
if ( command == "cmd_delete" )
|
||||
goSetMenuValue(command, 'valueFolder');
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_cut":
|
||||
case "cmd_copy":
|
||||
case "cmd_paste":
|
||||
return false;
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
if ( command == "cmd_delete" )
|
||||
goSetMenuValue(command, 'valueFolder');
|
||||
var folderTree = GetFolderTree();
|
||||
var startIndex = {};
|
||||
var endIndex = {};
|
||||
folderTree.view.selection.getRangeAt(0, startIndex, endIndex);
|
||||
if (startIndex.value >= 0) {
|
||||
var canDeleteThisFolder;
|
||||
var specialFolder = null;
|
||||
var isServer = null;
|
||||
var serverType = null;
|
||||
try {
|
||||
var specialFolder = null;
|
||||
var isServer = null;
|
||||
var serverType = null;
|
||||
try {
|
||||
var folderResource = GetFolderResource(folderTree, startIndex.value);
|
||||
specialFolder = GetFolderAttribute(folderTree, folderResource, "SpecialFolder");
|
||||
isServer = GetFolderAttribute(folderTree, folderResource, "IsServer");
|
||||
serverType = GetFolderAttribute(folderTree, folderResource, "ServerType");
|
||||
if (serverType == "nntp") {
|
||||
if ( command == "cmd_delete" ) {
|
||||
goSetMenuValue(command, 'valueNewsgroup');
|
||||
goSetAccessKey(command, 'valueNewsgroupAccessKey');
|
||||
if ( command == "cmd_delete" ) {
|
||||
goSetMenuValue(command, 'valueNewsgroup');
|
||||
goSetAccessKey(command, 'valueNewsgroupAccessKey');
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("specialFolder failure: " + ex + "\n");
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("specialFolder failure: " + ex + "\n");
|
||||
}
|
||||
if (specialFolder == "Inbox" || specialFolder == "Trash" || specialFolder == "Drafts" ||
|
||||
specialFolder == "Sent" || specialFolder == "Templates" || specialFolder == "Unsent Messages" ||
|
||||
(specialFolder == "Junk" && !CanRenameDeleteJunkMail(GetSelectedFolderURI())) || isServer == "true")
|
||||
|
@ -108,127 +108,127 @@ var FolderPaneController =
|
|||
canDeleteThisFolder = true;
|
||||
return canDeleteThisFolder && isCommandEnabled(command);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
else
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
doCommand: function(command)
|
||||
{
|
||||
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;
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
MsgDeleteFolder();
|
||||
break;
|
||||
}
|
||||
},
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
MsgDeleteFolder();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
onEvent: function(event)
|
||||
{
|
||||
}
|
||||
onEvent: function(event)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// DefaultController object (handles commands when one of the trees does not have focus)
|
||||
var DefaultController =
|
||||
{
|
||||
supportsCommand: function(command)
|
||||
{
|
||||
{
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_createFilterFromPopup":
|
||||
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_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_createFilterFromMenu":
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
case "button_junk":
|
||||
case "cmd_shiftDelete":
|
||||
case "cmd_nextMsg":
|
||||
case "cmd_shiftDelete":
|
||||
case "cmd_nextMsg":
|
||||
case "button_next":
|
||||
case "button_previous":
|
||||
case "cmd_nextUnreadMsg":
|
||||
case "cmd_nextFlaggedMsg":
|
||||
case "cmd_nextUnreadThread":
|
||||
case "cmd_previousMsg":
|
||||
case "cmd_previousUnreadMsg":
|
||||
case "cmd_previousFlaggedMsg":
|
||||
case "cmd_nextUnreadMsg":
|
||||
case "cmd_nextFlaggedMsg":
|
||||
case "cmd_nextUnreadThread":
|
||||
case "cmd_previousMsg":
|
||||
case "cmd_previousUnreadMsg":
|
||||
case "cmd_previousFlaggedMsg":
|
||||
case "button_goForward":
|
||||
case "button_goBack":
|
||||
case "cmd_goForward":
|
||||
case "cmd_goBack":
|
||||
case "cmd_goStartPage":
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
case "cmd_viewIgnoredThreads":
|
||||
case "cmd_undo":
|
||||
case "cmd_redo":
|
||||
case "cmd_expandAllThreads":
|
||||
case "cmd_collapseAllThreads":
|
||||
case "cmd_renameFolder":
|
||||
case "cmd_sendUnsentMsgs":
|
||||
case "cmd_openMessage":
|
||||
case "cmd_expandAllThreads":
|
||||
case "cmd_collapseAllThreads":
|
||||
case "cmd_renameFolder":
|
||||
case "cmd_sendUnsentMsgs":
|
||||
case "cmd_openMessage":
|
||||
case "button_print":
|
||||
case "cmd_print":
|
||||
case "cmd_printpreview":
|
||||
case "cmd_printSetup":
|
||||
case "cmd_saveAsFile":
|
||||
case "cmd_saveAsTemplate":
|
||||
case "cmd_print":
|
||||
case "cmd_printpreview":
|
||||
case "cmd_printSetup":
|
||||
case "cmd_saveAsFile":
|
||||
case "cmd_saveAsTemplate":
|
||||
case "cmd_properties":
|
||||
case "cmd_viewPageSource":
|
||||
case "cmd_setFolderCharset":
|
||||
case "cmd_reload":
|
||||
case "cmd_viewPageSource":
|
||||
case "cmd_setFolderCharset":
|
||||
case "cmd_reload":
|
||||
case "button_getNewMessages":
|
||||
case "cmd_getNewMessages":
|
||||
case "cmd_getNewMessages":
|
||||
case "cmd_getMsgsForAuthAccounts":
|
||||
case "cmd_getNextNMessages":
|
||||
case "cmd_find":
|
||||
case "cmd_findAgain":
|
||||
case "cmd_findPrevious":
|
||||
case "cmd_getNextNMessages":
|
||||
case "cmd_find":
|
||||
case "cmd_findAgain":
|
||||
case "cmd_findPrevious":
|
||||
case "cmd_search":
|
||||
case "button_mark":
|
||||
case "cmd_tag":
|
||||
case "cmd_markAsRead":
|
||||
case "cmd_markAllRead":
|
||||
case "cmd_markThreadAsRead":
|
||||
case "cmd_markAsRead":
|
||||
case "cmd_markAllRead":
|
||||
case "cmd_markThreadAsRead":
|
||||
case "cmd_markReadByDate":
|
||||
case "cmd_markAsFlagged":
|
||||
case "cmd_markAsJunk":
|
||||
case "cmd_markAsNotJunk":
|
||||
case "cmd_markAsFlagged":
|
||||
case "cmd_markAsJunk":
|
||||
case "cmd_markAsNotJunk":
|
||||
case "cmd_recalculateJunkScore":
|
||||
case "cmd_applyFilters":
|
||||
case "cmd_runJunkControls":
|
||||
case "cmd_deleteJunk":
|
||||
case "button_file":
|
||||
case "cmd_file":
|
||||
case "cmd_emptyTrash":
|
||||
case "cmd_compactFolder":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_file":
|
||||
case "cmd_emptyTrash":
|
||||
case "cmd_compactFolder":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_close":
|
||||
case "cmd_selectAll":
|
||||
case "cmd_selectThread":
|
||||
case "cmd_moveToFolderAgain":
|
||||
return true;
|
||||
return true;
|
||||
case "cmd_downloadFlagged":
|
||||
case "cmd_downloadSelected":
|
||||
case "cmd_synchronizeOffline":
|
||||
|
@ -238,10 +238,10 @@ var DefaultController =
|
|||
case "cmd_killThread":
|
||||
return(isNewsURI(GetFirstSelectedMessage()));
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
isCommandEnabled: function(command)
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ var DefaultController =
|
|||
}
|
||||
return false;
|
||||
case "cmd_printpreview":
|
||||
if ( GetNumSelectedMessages() == 1 && gDBView)
|
||||
if ( GetNumSelectedMessages() == 1 && gDBView)
|
||||
{
|
||||
gDBView.getCommandStatus(nsMsgViewCommandType.cmdRequiringMsgBody, enabled, checkStatus);
|
||||
return enabled.value;
|
||||
|
@ -436,101 +436,101 @@ var DefaultController =
|
|||
return false;
|
||||
},
|
||||
|
||||
doCommand: function(command)
|
||||
{
|
||||
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;
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_close":
|
||||
CloseMailWindow();
|
||||
break;
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_close":
|
||||
CloseMailWindow();
|
||||
break;
|
||||
case "button_getNewMessages":
|
||||
case "cmd_getNewMessages":
|
||||
MsgGetMessage();
|
||||
break;
|
||||
case "cmd_getNewMessages":
|
||||
MsgGetMessage();
|
||||
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_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_createFilterFromMenu":
|
||||
MsgCreateFilter();
|
||||
break;
|
||||
case "cmd_createFilterFromPopup":
|
||||
break;// This does nothing because the createfilter is invoked from the popupnode oncommand.
|
||||
case "button_delete":
|
||||
case "cmd_delete":
|
||||
case "button_delete":
|
||||
case "cmd_delete":
|
||||
// if the user deletes a message before its mark as read timer goes off, we should mark it as read
|
||||
// this ensures that we clear the biff indicator from the system tray when the user deletes the new message
|
||||
if (gMarkViewedMessageAsReadTimer)
|
||||
MarkCurrentMessageAsRead();
|
||||
SetNextMessageAfterDelete();
|
||||
gDBView.doCommand(nsMsgViewCommandType.deleteMsg);
|
||||
break;
|
||||
case "cmd_shiftDelete":
|
||||
break;
|
||||
case "cmd_shiftDelete":
|
||||
if (gMarkViewedMessageAsReadTimer)
|
||||
MarkCurrentMessageAsRead();
|
||||
SetNextMessageAfterDelete();
|
||||
gDBView.doCommand(nsMsgViewCommandType.deleteNoTrash);
|
||||
break;
|
||||
break;
|
||||
case "cmd_killThread":
|
||||
/* kill thread kills the thread and then does a next unread */
|
||||
GoNextMessage(nsMsgNavigationType.toggleThreadKilled, true);
|
||||
GoNextMessage(nsMsgNavigationType.toggleThreadKilled, true);
|
||||
break;
|
||||
case "cmd_watchThread":
|
||||
gDBView.doCommand(nsMsgViewCommandType.toggleThreadWatched);
|
||||
break;
|
||||
case "button_next":
|
||||
case "cmd_nextUnreadMsg":
|
||||
MsgNextUnreadMessage();
|
||||
break;
|
||||
case "cmd_nextUnreadThread":
|
||||
MsgNextUnreadThread();
|
||||
break;
|
||||
case "cmd_nextMsg":
|
||||
MsgNextMessage();
|
||||
break;
|
||||
case "cmd_nextFlaggedMsg":
|
||||
MsgNextFlaggedMessage();
|
||||
break;
|
||||
case "cmd_previousMsg":
|
||||
MsgPreviousMessage();
|
||||
break;
|
||||
case "cmd_nextUnreadMsg":
|
||||
MsgNextUnreadMessage();
|
||||
break;
|
||||
case "cmd_nextUnreadThread":
|
||||
MsgNextUnreadThread();
|
||||
break;
|
||||
case "cmd_nextMsg":
|
||||
MsgNextMessage();
|
||||
break;
|
||||
case "cmd_nextFlaggedMsg":
|
||||
MsgNextFlaggedMessage();
|
||||
break;
|
||||
case "cmd_previousMsg":
|
||||
MsgPreviousMessage();
|
||||
break;
|
||||
case "button_previous":
|
||||
case "cmd_previousUnreadMsg":
|
||||
MsgPreviousUnreadMessage();
|
||||
break;
|
||||
case "cmd_previousFlaggedMsg":
|
||||
MsgPreviousFlaggedMessage();
|
||||
break;
|
||||
case "cmd_previousUnreadMsg":
|
||||
MsgPreviousUnreadMessage();
|
||||
break;
|
||||
case "cmd_previousFlaggedMsg":
|
||||
MsgPreviousFlaggedMessage();
|
||||
break;
|
||||
case "button_goForward":
|
||||
case "cmd_goForward":
|
||||
MsgGoForward();
|
||||
|
@ -543,76 +543,76 @@ var DefaultController =
|
|||
HideMessageHeaderPane();
|
||||
loadStartPage();
|
||||
break;
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewIgnoredThreads":
|
||||
SwitchView(command);
|
||||
break;
|
||||
case "cmd_undo":
|
||||
messenger.undo(msgWindow);
|
||||
break;
|
||||
case "cmd_redo":
|
||||
messenger.redo(msgWindow);
|
||||
break;
|
||||
case "cmd_expandAllThreads":
|
||||
SwitchView(command);
|
||||
break;
|
||||
case "cmd_undo":
|
||||
messenger.undo(msgWindow);
|
||||
break;
|
||||
case "cmd_redo":
|
||||
messenger.redo(msgWindow);
|
||||
break;
|
||||
case "cmd_expandAllThreads":
|
||||
gDBView.doCommand(nsMsgViewCommandType.expandAll);
|
||||
break;
|
||||
case "cmd_collapseAllThreads":
|
||||
break;
|
||||
case "cmd_collapseAllThreads":
|
||||
gDBView.doCommand(nsMsgViewCommandType.collapseAll);
|
||||
break;
|
||||
case "cmd_renameFolder":
|
||||
MsgRenameFolder();
|
||||
return;
|
||||
case "cmd_sendUnsentMsgs":
|
||||
MsgSendUnsentMsgs();
|
||||
return;
|
||||
case "cmd_openMessage":
|
||||
break;
|
||||
case "cmd_renameFolder":
|
||||
MsgRenameFolder();
|
||||
return;
|
||||
case "cmd_sendUnsentMsgs":
|
||||
MsgSendUnsentMsgs();
|
||||
return;
|
||||
case "cmd_openMessage":
|
||||
MsgOpenSelectedMessages();
|
||||
return;
|
||||
case "cmd_printSetup":
|
||||
PrintUtils.showPageSetup();
|
||||
return;
|
||||
case "cmd_print":
|
||||
PrintEnginePrint();
|
||||
return;
|
||||
case "cmd_printpreview":
|
||||
PrintEnginePrintPreview();
|
||||
return;
|
||||
case "cmd_saveAsFile":
|
||||
MsgSaveAsFile();
|
||||
return;
|
||||
case "cmd_saveAsTemplate":
|
||||
MsgSaveAsTemplate();
|
||||
return;
|
||||
case "cmd_viewPageSource":
|
||||
MsgViewPageSource();
|
||||
return;
|
||||
case "cmd_setFolderCharset":
|
||||
MsgSetFolderCharset();
|
||||
return;
|
||||
case "cmd_reload":
|
||||
MsgReload();
|
||||
return;
|
||||
case "cmd_find":
|
||||
return;
|
||||
case "cmd_printSetup":
|
||||
PrintUtils.showPageSetup();
|
||||
return;
|
||||
case "cmd_print":
|
||||
PrintEnginePrint();
|
||||
return;
|
||||
case "cmd_printpreview":
|
||||
PrintEnginePrintPreview();
|
||||
return;
|
||||
case "cmd_saveAsFile":
|
||||
MsgSaveAsFile();
|
||||
return;
|
||||
case "cmd_saveAsTemplate":
|
||||
MsgSaveAsTemplate();
|
||||
return;
|
||||
case "cmd_viewPageSource":
|
||||
MsgViewPageSource();
|
||||
return;
|
||||
case "cmd_setFolderCharset":
|
||||
MsgSetFolderCharset();
|
||||
return;
|
||||
case "cmd_reload":
|
||||
MsgReload();
|
||||
return;
|
||||
case "cmd_find":
|
||||
// make sure the message pane has focus before we start a find since we only support searching
|
||||
// within the message body. Do it here and not in MsgFind() which can be called from standalone where we don't want to set focus
|
||||
SetFocusMessagePane();
|
||||
MsgFind();
|
||||
return;
|
||||
case "cmd_findAgain":
|
||||
MsgFind();
|
||||
return;
|
||||
case "cmd_findAgain":
|
||||
// make sure the message pane has focus before we start a find since we only support searching
|
||||
// within the message body. Do it here and not in MsgFind() which can be called from standalone where we don't want to set focus
|
||||
SetFocusMessagePane();
|
||||
MsgFindAgain(false);
|
||||
return;
|
||||
case "cmd_findPrevious":
|
||||
MsgFindAgain(false);
|
||||
return;
|
||||
case "cmd_findPrevious":
|
||||
// make sure the message pane has focus before we start a find since we only support searching
|
||||
// within the message body. Do it here and not in MsgFind() which can be called from standalone where we don't want to set focus
|
||||
SetFocusMessagePane();
|
||||
MsgFindAgain(true);
|
||||
return;
|
||||
MsgFindAgain(true);
|
||||
return;
|
||||
case "cmd_markReadByDate":
|
||||
MsgMarkReadByDate();
|
||||
return;
|
||||
|
@ -623,30 +623,30 @@ var DefaultController =
|
|||
MsgSearchMessages();
|
||||
return;
|
||||
case "button_mark":
|
||||
case "cmd_markAsRead":
|
||||
MsgMarkMsgAsRead(null);
|
||||
return;
|
||||
case "cmd_markThreadAsRead":
|
||||
MsgMarkThreadAsRead();
|
||||
return;
|
||||
case "cmd_markAllRead":
|
||||
case "cmd_markAsRead":
|
||||
MsgMarkMsgAsRead(null);
|
||||
return;
|
||||
case "cmd_markThreadAsRead":
|
||||
MsgMarkThreadAsRead();
|
||||
return;
|
||||
case "cmd_markAllRead":
|
||||
gDBView.doCommand(nsMsgViewCommandType.markAllRead);
|
||||
return;
|
||||
return;
|
||||
case "button_junk":
|
||||
MsgJunk();
|
||||
return;
|
||||
case "cmd_stop":
|
||||
MsgStop();
|
||||
return;
|
||||
case "cmd_markAsFlagged":
|
||||
MsgMarkAsFlagged(null);
|
||||
return;
|
||||
case "cmd_markAsJunk":
|
||||
case "cmd_markAsFlagged":
|
||||
MsgMarkAsFlagged(null);
|
||||
return;
|
||||
case "cmd_markAsJunk":
|
||||
JunkSelectedMessages(true);
|
||||
return;
|
||||
case "cmd_markAsNotJunk":
|
||||
return;
|
||||
case "cmd_markAsNotJunk":
|
||||
JunkSelectedMessages(false);
|
||||
return;
|
||||
return;
|
||||
case "cmd_recalculateJunkScore":
|
||||
analyzeMessagesForJunk();
|
||||
return;
|
||||
|
@ -659,12 +659,12 @@ var DefaultController =
|
|||
case "cmd_deleteJunk":
|
||||
deleteJunkInFolder();
|
||||
return;
|
||||
case "cmd_emptyTrash":
|
||||
MsgEmptyTrash();
|
||||
return;
|
||||
case "cmd_compactFolder":
|
||||
MsgCompactFolder(true);
|
||||
return;
|
||||
case "cmd_emptyTrash":
|
||||
MsgEmptyTrash();
|
||||
return;
|
||||
case "cmd_compactFolder":
|
||||
MsgCompactFolder(true);
|
||||
return;
|
||||
case "cmd_downloadFlagged":
|
||||
MsgDownloadFlagged();
|
||||
break;
|
||||
|
@ -697,18 +697,18 @@ var DefaultController =
|
|||
case "cmd_selectThread":
|
||||
gDBView.doCommand(nsMsgViewCommandType.selectThread);
|
||||
break;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
onEvent: function(event)
|
||||
{
|
||||
// on blur events set the menu item texts back to the normal values
|
||||
if ( event == 'blur' )
|
||||
onEvent: function(event)
|
||||
{
|
||||
// on blur events set the menu item texts back to the normal values
|
||||
if ( event == 'blur' )
|
||||
{
|
||||
goSetMenuValue('cmd_undo', 'valueDefault');
|
||||
goSetMenuValue('cmd_redo', 'valueDefault');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function GetNumSelectedMessages()
|
||||
|
@ -760,29 +760,29 @@ function WhichPaneHasFocus()
|
|||
if (top.document.commandDispatcher.focusedWindow == GetMessagePaneFrame())
|
||||
return messagePane;
|
||||
|
||||
var currentNode = top.document.commandDispatcher.focusedElement;
|
||||
while (currentNode) {
|
||||
var currentNode = top.document.commandDispatcher.focusedElement;
|
||||
while (currentNode) {
|
||||
if (currentNode === threadTree ||
|
||||
currentNode === folderTree ||
|
||||
currentNode === messagePane)
|
||||
return currentNode;
|
||||
|
||||
currentNode = currentNode.parentNode;
|
||||
currentNode = currentNode.parentNode;
|
||||
}
|
||||
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
function SetupCommandUpdateHandlers()
|
||||
{
|
||||
var widget;
|
||||
var widget;
|
||||
|
||||
// folder pane
|
||||
widget = GetFolderTree();
|
||||
if ( widget )
|
||||
widget.controllers.appendController(FolderPaneController);
|
||||
// folder pane
|
||||
widget = GetFolderTree();
|
||||
if ( widget )
|
||||
widget.controllers.appendController(FolderPaneController);
|
||||
|
||||
top.controllers.insertControllerAt(0, DefaultController);
|
||||
top.controllers.insertControllerAt(0, DefaultController);
|
||||
}
|
||||
|
||||
function IsSendUnsentMsgsEnabled(folderResource)
|
||||
|
@ -888,7 +888,7 @@ function IsPropertiesEnabled(command)
|
|||
|
||||
function IsViewNavigationItemEnabled()
|
||||
{
|
||||
return IsFolderSelected();
|
||||
return IsFolderSelected();
|
||||
}
|
||||
|
||||
function IsFolderSelected()
|
||||
|
@ -976,16 +976,16 @@ function SetFocusThreadPaneIfNotOnMessagePane()
|
|||
// 3pane related commands. Need to go in own file. Putting here for the moment.
|
||||
function MsgNextMessage()
|
||||
{
|
||||
GoNextMessage(nsMsgNavigationType.nextMessage, false );
|
||||
GoNextMessage(nsMsgNavigationType.nextMessage, false );
|
||||
}
|
||||
|
||||
function MsgNextUnreadMessage()
|
||||
{
|
||||
GoNextMessage(nsMsgNavigationType.nextUnreadMessage, true);
|
||||
GoNextMessage(nsMsgNavigationType.nextUnreadMessage, true);
|
||||
}
|
||||
function MsgNextFlaggedMessage()
|
||||
{
|
||||
GoNextMessage(nsMsgNavigationType.nextFlagged, true);
|
||||
GoNextMessage(nsMsgNavigationType.nextFlagged, true);
|
||||
}
|
||||
|
||||
function MsgNextUnreadThread()
|
||||
|
@ -1000,12 +1000,12 @@ function MsgPreviousMessage()
|
|||
|
||||
function MsgPreviousUnreadMessage()
|
||||
{
|
||||
GoNextMessage(nsMsgNavigationType.previousUnreadMessage, true);
|
||||
GoNextMessage(nsMsgNavigationType.previousUnreadMessage, true);
|
||||
}
|
||||
|
||||
function MsgPreviousFlaggedMessage()
|
||||
{
|
||||
GoNextMessage(nsMsgNavigationType.previousFlagged, true);
|
||||
GoNextMessage(nsMsgNavigationType.previousFlagged, true);
|
||||
}
|
||||
|
||||
function MsgGoForward()
|
||||
|
@ -1020,22 +1020,22 @@ function MsgGoBack()
|
|||
|
||||
function GetFolderNameFromUri(uri, tree)
|
||||
{
|
||||
var folderResource = RDF.GetResource(uri);
|
||||
var folderResource = RDF.GetResource(uri);
|
||||
|
||||
var db = tree.database;
|
||||
var db = tree.database;
|
||||
|
||||
var nameProperty = RDF.GetResource('http://home.netscape.com/NC-rdf#Name');
|
||||
var nameProperty = RDF.GetResource('http://home.netscape.com/NC-rdf#Name');
|
||||
|
||||
var nameResult;
|
||||
try {
|
||||
nameResult = db.GetTarget(folderResource, nameProperty , true);
|
||||
}
|
||||
catch (ex) {
|
||||
return "";
|
||||
}
|
||||
var nameResult;
|
||||
try {
|
||||
nameResult = db.GetTarget(folderResource, nameProperty , true);
|
||||
}
|
||||
catch (ex) {
|
||||
return "";
|
||||
}
|
||||
|
||||
nameResult = nameResult.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
return nameResult.Value;
|
||||
nameResult = nameResult.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
return nameResult.Value;
|
||||
}
|
||||
|
||||
function SwitchPaneFocus(event)
|
||||
|
|
|
@ -89,10 +89,10 @@ function OnMailWindowUnload()
|
|||
if (gPreQuickSearchView) //close the cached pre quick search view
|
||||
gPreQuickSearchView.close();
|
||||
}
|
||||
|
||||
|
||||
var dbview = GetDBView();
|
||||
if (dbview) {
|
||||
dbview.close();
|
||||
dbview.close();
|
||||
}
|
||||
|
||||
var mailSession = Components.classes[mailSessionContractID].getService();
|
||||
|
@ -107,10 +107,10 @@ function OnMailWindowUnload()
|
|||
messenger.setWindow(null, null);
|
||||
|
||||
var msgDS;
|
||||
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
||||
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
||||
unreadFolderDataSource, favoriteFoldersDataSource,
|
||||
recentFoldersDataSource];
|
||||
|
||||
|
||||
for (index in viewDataSources)
|
||||
{
|
||||
msgDS = viewDataSources[index].QueryInterface(Components.interfaces.nsIMsgRDFDataSource);
|
||||
|
@ -181,12 +181,12 @@ function InitMsgWindow()
|
|||
{
|
||||
msgWindow.windowCommands = new nsMsgWindowCommands();
|
||||
// set the domWindow before setting the status feedback and header sink objects
|
||||
msgWindow.domWindow = window;
|
||||
msgWindow.domWindow = window;
|
||||
msgWindow.statusFeedback = statusFeedback;
|
||||
msgWindow.msgHeaderSink = messageHeaderSink;
|
||||
mailSession.AddMsgWindow(msgWindow);
|
||||
getBrowser().docShell.allowAuth = false;
|
||||
msgWindow.rootDocShell.allowAuth = true;
|
||||
msgWindow.rootDocShell.allowAuth = true;
|
||||
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ function AddDataSources()
|
|||
//Add statusFeedback
|
||||
|
||||
var msgDS;
|
||||
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
||||
var viewDataSources = [accountManagerDataSource, folderDataSource,
|
||||
unreadFolderDataSource, favoriteFoldersDataSource,
|
||||
recentFoldersDataSource];
|
||||
for (index in viewDataSources)
|
||||
|
@ -286,7 +286,7 @@ nsMsgStatusFeedback.prototype =
|
|||
{
|
||||
if (iid.equals(Components.interfaces.nsIMsgStatusFeedback) ||
|
||||
iid.equals(Components.interfaces.nsIXULBrowserWindow) ||
|
||||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
|
||||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
|
@ -311,7 +311,7 @@ nsMsgStatusFeedback.prototype =
|
|||
|
||||
if (!this.progressMeterVisible)
|
||||
{
|
||||
this.progressMeterContainer.removeAttribute('collapsed');
|
||||
this.progressMeterContainer.removeAttribute('collapsed');
|
||||
this.progressMeterVisible = true;
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ nsMsgStatusFeedback.prototype =
|
|||
|
||||
this.ensureStatusFields();
|
||||
this.showStatusString(defaultStatus);
|
||||
|
||||
|
||||
// stop the throbber
|
||||
if (this.throbber)
|
||||
this.throbber.setAttribute("busy", false);
|
||||
|
@ -420,17 +420,17 @@ nsMsgWindowCommands.prototype =
|
|||
return this;
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
},
|
||||
|
||||
|
||||
selectFolder: function(folderUri)
|
||||
{
|
||||
SelectFolder(folderUri);
|
||||
},
|
||||
|
||||
|
||||
selectMessage: function(messageUri)
|
||||
{
|
||||
SelectMessage(messageUri);
|
||||
},
|
||||
|
||||
|
||||
clearMsgPane: function()
|
||||
{
|
||||
if (gDBView)
|
||||
|
@ -438,7 +438,7 @@ nsMsgWindowCommands.prototype =
|
|||
else
|
||||
setTitleFromFolder(null,null);
|
||||
ClearMessagePane();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function StopUrls()
|
||||
|
@ -446,9 +446,9 @@ function StopUrls()
|
|||
msgWindow.StopUrls();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns the pref name to use for fetching the start page url. Every time the application version changes,
|
||||
* return "mailnews.start_page.override_url". If this is the first time the application has been
|
||||
/**
|
||||
* @returns the pref name to use for fetching the start page url. Every time the application version changes,
|
||||
* return "mailnews.start_page.override_url". If this is the first time the application has been
|
||||
* launched, return "mailnews.start_page.welcome_url". Otherwise return "mailnews.start_page.url".
|
||||
*/
|
||||
function startPageUrlPref()
|
||||
|
@ -458,7 +458,7 @@ function startPageUrlPref()
|
|||
try {
|
||||
savedVersion = pref.getCharPref("mailnews.start_page_override.mstone");
|
||||
} catch (ex) {}
|
||||
|
||||
|
||||
if (savedVersion != "ignore")
|
||||
{
|
||||
var currentPlatformVersion = Components.classes["@mozilla.org/xre/app-info;1"].
|
||||
|
@ -470,11 +470,11 @@ function startPageUrlPref()
|
|||
else if (currentPlatformVersion != savedVersion)
|
||||
prefForStartPageUrl = "mailnews.start_page.override_url";
|
||||
}
|
||||
|
||||
|
||||
return prefForStartPageUrl;
|
||||
}
|
||||
|
||||
function loadStartPage()
|
||||
function loadStartPage()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -528,7 +528,7 @@ function HidingAccountCentral()
|
|||
|
||||
function ShowThreadPane()
|
||||
{
|
||||
document.getElementById("displayDeck").selectedPanel =
|
||||
document.getElementById("displayDeck").selectedPanel =
|
||||
document.getElementById("threadPaneBox");
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ function ShowingThreadPane()
|
|||
GetMessagePane().collapsed = (threadPaneSplitter.getAttribute("state") == "collapsed");
|
||||
// XXX We need to force the tree to refresh its new height
|
||||
// so that it will correctly scroll to the newest message
|
||||
GetThreadTree().boxObject.height;
|
||||
GetThreadTree().boxObject.height;
|
||||
document.getElementById("key_toggleMessagePane").removeAttribute("disabled");
|
||||
}
|
||||
|
||||
|
@ -554,7 +554,7 @@ function HidingThreadPane()
|
|||
}
|
||||
|
||||
// the find toolbar needs a method called getBrowser
|
||||
function getBrowser()
|
||||
function getBrowser()
|
||||
{
|
||||
return getMessageBrowser();
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ function ObserveDisplayDeckChange(event)
|
|||
ShowingThreadPane();
|
||||
else
|
||||
HidingThreadPane();
|
||||
|
||||
|
||||
if (nowSelected == "accountCentralBox")
|
||||
ShowingAccountCentral();
|
||||
else
|
||||
|
@ -582,7 +582,7 @@ function ObserveDisplayDeckChange(event)
|
|||
}
|
||||
|
||||
// Given the server, open the twisty and the set the selection
|
||||
// on inbox of that server.
|
||||
// on inbox of that server.
|
||||
// prompt if offline.
|
||||
function OpenInboxForServer(server)
|
||||
{
|
||||
|
@ -591,7 +591,7 @@ function OpenInboxForServer(server)
|
|||
var inboxFolder = GetInboxFolder(server);
|
||||
SelectFolder(inboxFolder.URI);
|
||||
|
||||
if (MailOfflineMgr.isOnline() || MailOfflineMgr.getNewMail()) {
|
||||
if (MailOfflineMgr.isOnline() || MailOfflineMgr.getNewMail()) {
|
||||
if (server.type != "imap")
|
||||
GetMessagesForInboxOnServer(server);
|
||||
}
|
||||
|
|
|
@ -70,15 +70,15 @@
|
|||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
|
||||
<stringbundle id="bundle_shell" src="chrome://messenger/locale/shellservice.properties"/>
|
||||
<stringbundle id="bundle_shell" src="chrome://messenger/locale/shellservice.properties"/>
|
||||
<stringbundle id="bundle_offlinePrompts" src="chrome://messenger/locale/offline.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
|
||||
<!-- Performance optimization...we include utilityOverlay.xul which defines some command sets
|
||||
which are updated based on events like focus and select. We have our own custom events
|
||||
which we use to optmize when we do command updating. To avoid unnecessary command updating,
|
||||
we are going to override the events the global edit menu items and select edit menu items
|
||||
are updated on with events of our own controlling.
|
||||
are updated on with events of our own controlling.
|
||||
-->
|
||||
|
||||
<commandset id="globalEditMenuItems"
|
||||
|
@ -100,7 +100,7 @@
|
|||
<command id="cmd_getNewMessages" oncommand="goDoCommand('cmd_getNewMessages')" disabled="true"/>
|
||||
<command id="cmd_close" oncommand="goDoCommand('cmd_close')"/>
|
||||
<command id="cmd_open" oncommand="goDoCommand('cmd_open')"/>
|
||||
|
||||
|
||||
<command id="cmd_file" disabled="true"/>
|
||||
|
||||
<command id="cmd_emptyTrash" oncommand="goDoCommand('cmd_emptyTrash')" disabled="true"/>
|
||||
|
@ -109,14 +109,14 @@
|
|||
<command id="cmd_print" oncommand="goDoCommand('cmd_print')" disabled="true"/>
|
||||
<command id="cmd_printpreview" oncommand="goDoCommand('cmd_printpreview')" disabled="true"/>
|
||||
<command id="cmd_saveAsFile" oncommand="goDoCommand('cmd_saveAsFile')" disabled="true"/>
|
||||
<command id="cmd_saveAsTemplate" oncommand="goDoCommand('cmd_saveAsTemplate')" disabled="true"/>
|
||||
<command id="cmd_saveAsTemplate" oncommand="goDoCommand('cmd_saveAsTemplate')" disabled="true"/>
|
||||
<command id="cmd_getNextNMessages" oncommand="goDoCommand('cmd_getNextNMessages')" disabled="true"/>
|
||||
<command id="cmd_renameFolder" oncommand="goDoCommand('cmd_renameFolder')" />
|
||||
<command id="cmd_sendUnsentMsgs" oncommand="goDoCommand('cmd_sendUnsentMsgs')" />
|
||||
<command id="cmd_synchronizeOffline" oncommand="goDoCommand('cmd_synchronizeOffline')" disabled="true"/>
|
||||
<command id="cmd_downloadFlagged" oncommand="goDoCommand('cmd_downloadFlagged')" disabled="true"/>
|
||||
<command id="cmd_downloadSelected" oncommand="goDoCommand('cmd_downloadSelected')" disabled="true"/>
|
||||
<command id="cmd_settingsOffline" oncommand="goDoCommand('cmd_settingsOffline')" disabled="true"/>
|
||||
<command id="cmd_settingsOffline" oncommand="goDoCommand('cmd_settingsOffline')" disabled="true"/>
|
||||
</commandset>
|
||||
|
||||
<commandset id="mailCommands">
|
||||
|
@ -242,7 +242,7 @@
|
|||
commandupdater="true"
|
||||
events="mail-toolbar"
|
||||
oncommandupdate="goUpdateMailMenuItems(this)">
|
||||
|
||||
|
||||
<command id="button_reply"/>
|
||||
<command id="button_replyall"/>
|
||||
<command id="button_forward"/>
|
||||
|
@ -265,8 +265,8 @@
|
|||
events="create-menu-getMsgToolbar,create-menu-file"
|
||||
oncommandupdate="goUpdateMailMenuItems(this)">
|
||||
|
||||
<command id="cmd_getMsgsForAuthAccounts"
|
||||
oncommand="goDoCommand('cmd_getMsgsForAuthAccounts'); event.stopPropagation()"
|
||||
<command id="cmd_getMsgsForAuthAccounts"
|
||||
oncommand="goDoCommand('cmd_getMsgsForAuthAccounts'); event.stopPropagation()"
|
||||
disabled="true"/>
|
||||
</commandset>
|
||||
|
||||
|
@ -330,7 +330,7 @@
|
|||
#endif
|
||||
<key id="key_selectAll"/>
|
||||
<key id="key_selectThread" key="&selectThreadCmd.key;" oncommand="goDoCommand('cmd_selectThread');" modifiers="accel, shift"/>
|
||||
|
||||
|
||||
<key id="key_toggleRead" key="&markAsReadCmd.key;" oncommand="goDoCommand('cmd_markAsRead');"/>
|
||||
<key id="key_toggleFlagged" key="&markStarredCmd.key;" oncommand="goDoCommand('cmd_markAsFlagged');"/>
|
||||
<key id="key_markJunk" key="&markAsJunkCmd.key;" oncommand="goDoCommand('cmd_markAsJunk');"/>
|
||||
|
@ -375,8 +375,8 @@
|
|||
#elifdef XP_UNIX
|
||||
<key id="key_getNewMessages2" keycode="VK_F9" oncommand="goDoCommand('cmd_getNewMessages')"/>
|
||||
#endif
|
||||
<key id="key_getAllNewMessages"
|
||||
key="&getAllNewMsgCmd.key;"
|
||||
<key id="key_getAllNewMessages"
|
||||
key="&getAllNewMsgCmd.key;"
|
||||
oncommand="goDoCommand('cmd_getMsgsForAuthAccounts');"
|
||||
modifiers="accel, shift"/>
|
||||
<key id="key_find" key="&findCmd.key;" oncommand="goDoCommand('cmd_find')" modifiers="accel"/>
|
||||
|
@ -486,7 +486,7 @@
|
|||
sortDirection="ascending"
|
||||
datasources="rdf:null">
|
||||
<menupopup>
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -495,8 +495,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -508,7 +508,7 @@
|
|||
</menu>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
<template>
|
||||
<template>
|
||||
<rule nc:NoSelect="true" iscontainer="true" isempty="false">
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
|
@ -518,7 +518,7 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</rule>
|
||||
<rule nc:NoSelect="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" disabled="true"/>
|
||||
|
@ -533,7 +533,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
oncommand="MsgMoveMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -559,7 +559,7 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -569,7 +569,7 @@
|
|||
</rule>
|
||||
</template>
|
||||
</menu>
|
||||
|
||||
|
||||
<menu id="threadPaneContext-copyMenu"
|
||||
label="&contextCopyMsgMenu.label;"
|
||||
accesskey="&contextCopyMsgMenu.accesskey;"
|
||||
|
@ -577,7 +577,7 @@
|
|||
sortDirection="ascending"
|
||||
datasources="rdf:null">
|
||||
<menupopup>
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -586,8 +586,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -609,7 +609,7 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</rule>
|
||||
<rule nc:NoSelect="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" disabled="true"/>
|
||||
|
@ -624,7 +624,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
oncommand="MsgCopyMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -650,8 +650,8 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -734,11 +734,11 @@
|
|||
accesskey="&folderContextGetMessages.accesskey;"
|
||||
oncommand="MsgGetMessage();"/>
|
||||
|
||||
<menuitem id="folderPaneContext-openNewWindow"
|
||||
<menuitem id="folderPaneContext-openNewWindow"
|
||||
label="&folderContextOpenNewWindow.label;"
|
||||
accesskey="&folderContextOpenNewWindow.accesskey;"
|
||||
oncommand="MsgOpenNewWindowForFolder(null,-1);"/>
|
||||
<menuitem id="folderPaneContext-openNewTab"
|
||||
<menuitem id="folderPaneContext-openNewTab"
|
||||
label="&folderContextOpenNewTab.label;"
|
||||
accesskey="&folderContextOpenNewTab.accesskey;"
|
||||
oncommand="MsgOpenNewTabForFolder(null,-1);"/>
|
||||
|
@ -813,7 +813,7 @@
|
|||
oncommand="MsgFolderProperties();"/>
|
||||
</popup>
|
||||
|
||||
<popup id="messagePaneContext"
|
||||
<popup id="messagePaneContext"
|
||||
onpopupshowing="if (event.target != this) return true; gContextMenu = new nsContextMenu(this); return fillMessagePaneContextMenu();"
|
||||
onpopuphiding="if (event.target == this) gContextMenu = null;">
|
||||
<menuseparator id="messagePaneContext-sep-link"/>
|
||||
|
@ -858,7 +858,7 @@
|
|||
sortDirection="ascending"
|
||||
datasources="rdf:null">
|
||||
<menupopup>
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -867,8 +867,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -905,7 +905,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
oncommand="MsgMoveMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -948,7 +948,7 @@
|
|||
sortDirection="ascending"
|
||||
datasources="rdf:null">
|
||||
<menupopup>
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&contextMoveCopyMsgRecentMenu.label;" accesskey="&contextMoveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -957,8 +957,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -995,7 +995,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
oncommand="MsgCopyMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -1021,8 +1021,8 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -1033,7 +1033,7 @@
|
|||
</template>
|
||||
</menu>
|
||||
<menuitem id="messagePaneContext-moveToFolderAgain" command="cmd_moveToFolderAgain"
|
||||
label="&moveToFolderAgain.label;" accesskey="&moveToFolderAgain.accesskey;"/>
|
||||
label="&moveToFolderAgain.label;" accesskey="&moveToFolderAgain.accesskey;"/>
|
||||
<menuseparator id="messagePaneContext-sep-tags-1"/>
|
||||
<menu id="messagePaneContext-tags" label="&tagMenu.label;" accesskey="&tagMenu.accesskey;">
|
||||
<menupopup id="messagePaneContext-tagpopup" onpopupshowing="InitMessageTags(this)">
|
||||
|
@ -1067,13 +1067,13 @@
|
|||
accesskey="&markStarredCmd.accesskey;"
|
||||
command="cmd_markAsFlagged"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&markAsJunkCmd.label;"
|
||||
accesskey="&markAsJunkCmd.accesskey;"
|
||||
<menuitem label="&markAsJunkCmd.label;"
|
||||
accesskey="&markAsJunkCmd.accesskey;"
|
||||
command="cmd_markAsJunk"/>
|
||||
<menuitem label="&markAsNotJunkCmd.label;"
|
||||
accesskey="&markAsNotJunkCmd.accesskey;"
|
||||
<menuitem label="&markAsNotJunkCmd.label;"
|
||||
accesskey="&markAsNotJunkCmd.accesskey;"
|
||||
command="cmd_markAsNotJunk"/>
|
||||
<menuitem label="&recalculateJunkScoreCmd.label;"
|
||||
<menuitem label="&recalculateJunkScoreCmd.label;"
|
||||
accesskey="&recalculateJunkScoreCmd.accesskey;"
|
||||
command="cmd_recalculateJunkScore"/>
|
||||
|
||||
|
@ -1132,9 +1132,9 @@
|
|||
<menuitem oncommand="CustomizeMailToolbar('mail-toolbox');" id="CustomizeMailToolbar" label="&customizeToolbar.label;" accesskey="&customizeToolbar.accesskey;"/>
|
||||
</popup>
|
||||
|
||||
<toolbox id="mail-toolbox" class="toolbox-top" mode="full">
|
||||
<toolbox id="mail-toolbox" class="toolbox-top" mode="full">
|
||||
<!-- Menu -->
|
||||
<toolbar type="menubar" id="mail-toolbar-menubar2" class="chromeclass-menubar" customizable="true"
|
||||
<toolbar type="menubar" id="mail-toolbar-menubar2" class="chromeclass-menubar" customizable="true"
|
||||
#ifdef XP_MACOSX
|
||||
defaultset="menubar-items"
|
||||
#else
|
||||
|
@ -1199,7 +1199,7 @@
|
|||
<template>
|
||||
<rule nc:IsServer="true" nc:CanGetMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." value="..." label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
<menuitem uri="..." value="..." label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgGetMessagesForAccount(event)"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
|
@ -1224,7 +1224,7 @@
|
|||
<menuseparator id="trashMenuSeparator"/>
|
||||
<menu id="offlineMenuItem" label="&offlineMenu.label;" accesskey="&offlineMenu.accesskey;">
|
||||
<menupopup>
|
||||
<menuitem id="goOfflineMenuItem" type="checkbox" label="&offlineGoOfflineCmd.label;"
|
||||
<menuitem id="goOfflineMenuItem" type="checkbox" label="&offlineGoOfflineCmd.label;"
|
||||
accesskey="&offlineGoOfflineCmd.accesskey;" oncommand="MailOfflineMgr.toggleOfflineStatus();"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&synchronizeOfflineCmd.label;" accesskey="&synchronizeOfflineCmd.accesskey;" command="cmd_synchronizeOffline"/>
|
||||
|
@ -1243,7 +1243,7 @@
|
|||
<menuitem id="printMenuItem" key="key_print" label="&printCmd.label;" accesskey="&printCmd.accesskey;" command="cmd_print"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
||||
<!-- Edit -->
|
||||
<menu id="menu_Edit" oncommand="CommandUpdate_UndoRedo();">
|
||||
<menupopup onpopupshowing="InitEditMessagesMenu()">
|
||||
|
@ -1272,12 +1272,12 @@
|
|||
<menuitem id="menu_findCmd" label="&findCmd.label;" key="key_find" accesskey="&findCmd.accesskey;" command="cmd_find"/>
|
||||
<menuitem id="menu_findAgainCmd" label="&findAgainCmd.label;" key="key_findAgain" accesskey="&findAgainCmd.accesskey;" command="cmd_findAgain"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="searchMailCmd" label="&searchMailCmd.label;"
|
||||
key="key_searchMail"
|
||||
accesskey="&searchMailCmd.accesskey;"
|
||||
<menuitem id="searchMailCmd" label="&searchMailCmd.label;"
|
||||
key="key_searchMail"
|
||||
accesskey="&searchMailCmd.accesskey;"
|
||||
command="cmd_search"/>
|
||||
<menuitem id="searchAddressesCmd" label="&searchAddressesCmd.label;"
|
||||
accesskey="&searchAddressesCmd.accesskey;"
|
||||
<menuitem id="searchAddressesCmd" label="&searchAddressesCmd.label;"
|
||||
accesskey="&searchAddressesCmd.accesskey;"
|
||||
oncommand="MsgSearchAddresses()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
@ -1334,7 +1334,7 @@
|
|||
|
||||
<menu id="menu_FolderViews" label="&folderView.label;" accesskey="&folderView.accesskey;">
|
||||
<menupopup onpopupshowing="InitViewFolderViewsMenu(event)">
|
||||
<menuitem id="menu_allFolders" label="&allFolders.label;" accesskey="&allFolders.accesskey;"
|
||||
<menuitem id="menu_allFolders" label="&allFolders.label;" accesskey="&allFolders.accesskey;"
|
||||
type="radio" name="viewmessages" oncommand="loadFolderView(0);"/>
|
||||
<menuitem id="menu_unreadFolders" label="&unreadFolders.label;" accesskey="&unreadFolders.accesskey;"
|
||||
type="radio" name="viewmessages" oncommand="loadFolderView(1);"/>
|
||||
|
@ -1522,14 +1522,14 @@
|
|||
accesskey="&newMsgCmd.accesskey;"
|
||||
key="key_newMessage2"
|
||||
oncommand="MsgNewMessage(null);"/>
|
||||
<menuitem id="replyMainMenu" label="&replyMsgCmd.label;"
|
||||
<menuitem id="replyMainMenu" label="&replyMsgCmd.label;"
|
||||
accesskey="&replyMsgCmd.accesskey;"
|
||||
key="key_reply"
|
||||
command="cmd_reply"/>
|
||||
<menuitem id="replySenderMainMenu" label="&replySenderCmd.label;"
|
||||
<menuitem id="replySenderMainMenu" label="&replySenderCmd.label;"
|
||||
accesskey="&replySenderCmd.accesskey;"
|
||||
command="cmd_replySender"/>
|
||||
<menuitem id="replyNewsgroupMainMenu" label="&replyNewsgroupCmd.label;"
|
||||
<menuitem id="replyNewsgroupMainMenu" label="&replyNewsgroupCmd.label;"
|
||||
accesskey="&replyNewsgroupCmd.accesskey;"
|
||||
key="key_reply"
|
||||
command="cmd_replyGroup"/>
|
||||
|
@ -1560,7 +1560,7 @@
|
|||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending">
|
||||
<menupopup>
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -1569,8 +1569,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -1607,7 +1607,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
oncommand="MsgMoveMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -1648,7 +1648,7 @@
|
|||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending">
|
||||
<menupopup>
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -1657,8 +1657,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -1695,7 +1695,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
<menuitem label="©HereMenu.label;" accesskey="©HereMenu.accesskey;"
|
||||
oncommand="MsgCopyMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -1721,8 +1721,8 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
oncommand="MsgCopyMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -1762,26 +1762,26 @@
|
|||
/>
|
||||
<menuitem id="menu_markAllRead" label="&markAllReadCmd.label;" key="key_markAllRead" accesskey="&markAllReadCmd.accesskey;" command="cmd_markAllRead"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="markFlaggedMenuItem"
|
||||
type="checkbox"
|
||||
label="&markStarredCmd.label;"
|
||||
accesskey="&markStarredCmd.accesskey;"
|
||||
<menuitem id="markFlaggedMenuItem"
|
||||
type="checkbox"
|
||||
label="&markStarredCmd.label;"
|
||||
accesskey="&markStarredCmd.accesskey;"
|
||||
command="cmd_markAsFlagged"
|
||||
#ifndef XP_MACOSX
|
||||
key="key_toggleFlagged"
|
||||
#endif
|
||||
/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_markAsJunk" label="&markAsJunkCmd.label;"
|
||||
accesskey="&markAsJunkCmd.accesskey;"
|
||||
<menuitem id="menu_markAsJunk" label="&markAsJunkCmd.label;"
|
||||
accesskey="&markAsJunkCmd.accesskey;"
|
||||
command="cmd_markAsJunk"
|
||||
#ifndef XP_MACOSX
|
||||
key="key_markJunk"
|
||||
#endif
|
||||
/>
|
||||
<menuitem id="menu_markAsNotJunk" label="&markAsNotJunkCmd.label;"
|
||||
key="key_markNotJunk"
|
||||
accesskey="&markAsNotJunkCmd.accesskey;"
|
||||
key="key_markNotJunk"
|
||||
accesskey="&markAsNotJunkCmd.accesskey;"
|
||||
command="cmd_markAsNotJunk"/>
|
||||
<menuitem label="&recalculateJunkScoreCmd.label;"
|
||||
accesskey="&recalculateJunkScoreCmd.accesskey;"
|
||||
|
@ -1816,12 +1816,12 @@
|
|||
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
|
||||
<menupopup id="taskPopup" onpopupshowing="document.commandDispatcher.updateCommands('create-menu-tasks')">
|
||||
#ifndef XP_MACOSX
|
||||
<menuitem hidden="true" accesskey="&messengerCmd.accesskey;" label="&messengerCmd.label;"
|
||||
<menuitem hidden="true" accesskey="&messengerCmd.accesskey;" label="&messengerCmd.label;"
|
||||
key="key_mail" oncommand="toMessengerWindow();" id="tasksMenuMail" class="menuitem-iconic menu-iconic"/>
|
||||
<menuitem id="addressBook" label="&addressBookCmd.label;" accesskey="&addressBookCmd.accesskey;" key="key_addressbook"
|
||||
oncommand="toOpenWindowByType('mail:addressbook', 'chrome://messenger/content/addressbook/addressbook.xul');"/>
|
||||
#endif
|
||||
<menuitem id="addonsManager" label="&addons.label;" accesskey="&addons.accesskey;"
|
||||
<menuitem id="addonsManager" label="&addons.label;" accesskey="&addons.accesskey;"
|
||||
oncommand="openAddonsMgr();"/>
|
||||
<menuseparator id="devToolsSeparator"/>
|
||||
|
||||
|
@ -1835,15 +1835,15 @@
|
|||
<menuseparator/>
|
||||
<menuitem id="runJunkControls"
|
||||
label="&runJunkControls.label;"
|
||||
accesskey="&runJunkControls.accesskey;"
|
||||
command="cmd_runJunkControls"/>
|
||||
accesskey="&runJunkControls.accesskey;"
|
||||
command="cmd_runJunkControls"/>
|
||||
<menuitem id="deleteJunk"
|
||||
label="&deleteJunk.label;"
|
||||
accesskey="&deleteJunk.accesskey;"
|
||||
command="cmd_deleteJunk"/>
|
||||
accesskey="&deleteJunk.accesskey;"
|
||||
command="cmd_deleteJunk"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_import" label="&importCmd.label;"
|
||||
accesskey="&importCmd.accesskey;"
|
||||
<menuitem id="menu_import" label="&importCmd.label;"
|
||||
accesskey="&importCmd.accesskey;"
|
||||
oncommand="toImport();"/>
|
||||
<menuitem id="javaScriptConsole" label="&errorConsoleCmd.label;" accesskey="&errorConsoleCmd.accesskey;" oncommand="toJavaScriptConsole();"/>
|
||||
#ifndef XP_UNIX
|
||||
|
@ -1862,13 +1862,13 @@
|
|||
#endif
|
||||
#endif
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menu>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<!-- Mac window menu -->
|
||||
#include ../../../toolkit/content/macWindowMenu.inc
|
||||
#endif
|
||||
|
||||
|
||||
<!-- Help -->
|
||||
#ifdef XP_WIN
|
||||
<menu label="&helpMenuWin.label;" accesskey="&helpMenuWin.accesskey;">
|
||||
|
@ -1907,12 +1907,12 @@
|
|||
<toolbarbutton id="button-getmsg" type="menu-button"
|
||||
class="toolbarbutton-1"
|
||||
label="&getMsgButton.label;"
|
||||
tooltiptext="&getMsgButton.tooltip;"
|
||||
tooltiptext="&getMsgButton.tooltip;"
|
||||
oncommand="goDoCommand('cmd_getNewMessages')"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
observes="button_getNewMessages" datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
|
||||
containment="http://home.netscape.com/NC-rdf#child"
|
||||
observes="button_getNewMessages" datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
|
||||
containment="http://home.netscape.com/NC-rdf#child"
|
||||
ref="msgaccounts:/">
|
||||
<menupopup onpopupshowing="getMsgToolbarMenu_init()">
|
||||
<menuitem label="&getAllNewMsgCmd.label;" command="cmd_getMsgsForAuthAccounts"/>
|
||||
|
@ -1924,7 +1924,7 @@
|
|||
<menuitem uri="..." value="..." label="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgGetMessagesForAccount(event);"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</template>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton id="button-newmsg" class="toolbarbutton-1" label="&newMsgButton.label;" tooltiptext="&newMsgButton.tooltip;" oncommand="MsgNewMessage(event)"/>
|
||||
|
@ -1933,13 +1933,13 @@
|
|||
<toolbarbutton class="toolbarbutton-1" id="button-replyall" label="&replyAllButton.label;" tooltiptext="&replyAllButton.tooltip;" observes="button_replyall" oncommand="MsgReplyToAllMessage(event)"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-forward" label="&forwardButton.label;" tooltiptext="&forwardButton.tooltip;" observes="button_forward" oncommand="MsgForwardMessage(event)"/>
|
||||
|
||||
<toolbarbutton type="menu" id="button-file" class="toolbarbutton-1"
|
||||
<toolbarbutton type="menu" id="button-file" class="toolbarbutton-1"
|
||||
label="&fileButton.label;" observes="button_file"
|
||||
datasources="rdf:null"
|
||||
datasources="rdf:null"
|
||||
tooltiptext="&fileButton.tooltip;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName" sortDirection="ascending">
|
||||
<menupopup>
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
<menu label="&moveCopyMsgRecentMenu.label;" accesskey="&moveCopyMsgRecentMenu.accesskey;"
|
||||
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
|
||||
sortDirection="ascending"
|
||||
datasources="rdf:mailnewsrecentfolders"
|
||||
|
@ -1948,8 +1948,8 @@
|
|||
<template>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#FolderTreeSimpleName"
|
||||
oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -1960,8 +1960,8 @@
|
|||
</template>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
<template>
|
||||
</menupopup>
|
||||
<template>
|
||||
<rule nc:NoSelect="true" iscontainer="true" isempty="false">
|
||||
<menupopup>
|
||||
<menu uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name">
|
||||
|
@ -1971,7 +1971,7 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</rule>
|
||||
<rule nc:NoSelect="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menu-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" disabled="true"/>
|
||||
|
@ -1986,7 +1986,7 @@
|
|||
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
|
||||
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
|
||||
<menupopup>
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
<menuitem label="&fileHereMenu.label;" accesskey="&fileHereMenu.accesskey;"
|
||||
oncommand="MsgMoveMessage(event.target.parentNode.parentNode.id)"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
@ -2012,7 +2012,7 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgMoveMessage(event.target.id)"
|
||||
<menuitem uri="..." class="folderMenuItem menuitem-iconic" label="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MsgMoveMessage(event.target.id)"
|
||||
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"
|
||||
|
@ -2023,14 +2023,14 @@
|
|||
</template>
|
||||
<menupopup/>
|
||||
</toolbarbutton>
|
||||
|
||||
|
||||
<toolbarbutton class="toolbarbutton-1" type="menu-button" id="button-goback" label="&backButton1.label;" chromedir="&locale.dir;" oncommand="goDoCommand('cmd_goBack')" tooltiptext="&goBackButton.tooltip;" observes="button_goBack">
|
||||
<menupopup onpopupshowing="backToolbarMenu_init(this)">
|
||||
<menuitem label="&goBackCmd.label;" command="cmd_goBack"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton class="toolbarbutton-1" type="menu-button" id="button-goforward" label="&goForwardButton1.label;" chromedir="&locale.dir;" oncommand="goDoCommand('cmd_goForward')" tooltiptext="&goForwardButton.tooltip;" observes="button_goForward">
|
||||
<menupopup onpopupshowing="forwardToolbarMenu_init(this)">
|
||||
<menuitem label="&goForwardCmd.label;" command="cmd_goForward"/>
|
||||
|
@ -2038,32 +2038,32 @@
|
|||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-previous" label="&previousButton.label;" chromedir="&locale.dir;" oncommand="goDoCommand('button_previous')" tooltiptext="&previousButton.tooltip;" observes="button_previous"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-previous" label="&previousButton.label;" chromedir="&locale.dir;" oncommand="goDoCommand('button_previous')" tooltiptext="&previousButton.tooltip;" observes="button_previous"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-next" label="&nextButton.label;" chromedir="&locale.dir;" oncommand="goDoCommand('button_next')" tooltiptext="&nextButton.tooltip;" observes="button_next"/>
|
||||
|
||||
<toolbaritem id="button-junk">
|
||||
<toolbaritem id="button-junk">
|
||||
<deck id="junk-deck" observes="button_junk">
|
||||
<toolbarbutton class="toolbarbutton-1 junk-button"
|
||||
label="&junkButton.label;"
|
||||
tooltiptext="&junkButton.tooltip;"
|
||||
tooltiptext="&junkButton.tooltip;"
|
||||
observes="button_junk"
|
||||
oncommand="goDoCommand('button_junk')"/>
|
||||
<toolbarbutton class="toolbarbutton-1 junk-button"
|
||||
<toolbarbutton class="toolbarbutton-1 junk-button"
|
||||
label="¬JunkButton.label;"
|
||||
tooltiptext="¬JunkButton.tooltip;"
|
||||
tooltiptext="¬JunkButton.tooltip;"
|
||||
observes="button_junk"
|
||||
oncommand="goDoCommand('button_junk')"/>
|
||||
</deck>
|
||||
</toolbaritem>
|
||||
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-delete" label="&deleteButton.label;" tooltiptext="&deleteButton.tooltip;" observes="button_delete" oncommand="goDoCommand(event.shiftKey ? 'cmd_shiftDelete' : 'cmd_delete')"/>
|
||||
<toolbarbutton class="toolbarbutton-1" id="button-delete" label="&deleteButton.label;" tooltiptext="&deleteButton.tooltip;" observes="button_delete" oncommand="goDoCommand(event.shiftKey ? 'cmd_shiftDelete' : 'cmd_delete')"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<toolbarbutton id="button-print" class="toolbarbutton-1" label="&printButton.label;"
|
||||
observes="button_print" oncommand="goDoCommand('cmd_print')" tooltiptext="&printButton.tooltip;"/>
|
||||
#else
|
||||
<toolbarbutton id="button-print" class="toolbarbutton-1" label="&printButton.label;"
|
||||
observes="button_print" oncommand="goDoCommand('cmd_print')" tooltiptext="&printButton.tooltip;" type="menu-button">
|
||||
observes="button_print" oncommand="goDoCommand('cmd_print')" tooltiptext="&printButton.tooltip;" type="menu-button">
|
||||
<menupopup id="printMenu" onpopupshowing="goUpdateCommand('cmd_printpreview');">
|
||||
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" default="true"/>
|
||||
<menuitem label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" command="cmd_printpreview"/>
|
||||
|
@ -2071,14 +2071,14 @@
|
|||
</toolbarbutton>
|
||||
#endif
|
||||
<toolbarbutton id="button-mark" type="menu-button" class="toolbarbutton-1" label="&markButton.label;" oncommand="goDoCommand('button_mark')"
|
||||
observes="button_mark" tooltiptext="&markButton.tooltip;">
|
||||
observes="button_mark" tooltiptext="&markButton.tooltip;">
|
||||
<menupopup onpopupshowing="InitMessageMark()">
|
||||
<menuitem type="checkbox" key="key_toggleRead" id="markReadToolbarItem" label="&markAsReadCmd.label;" accesskey="&markAsReadCmd.accesskey;" command="cmd_markAsRead" />
|
||||
<menuitem label="&markThreadAsReadCmd.label;" key="key_markThreadAsRead" accesskey="&markThreadAsReadCmd.accesskey;" command="cmd_markThreadAsRead"/>
|
||||
<menuitem label="&markReadByDateCmd.label;" key="key_markReadByDate" accesskey="&markReadByDateCmd.accesskey;" command="cmd_markReadByDate"/>
|
||||
<menuitem label="&markAllReadCmd.label;" key="key_markAllRead" accesskey="&markAllReadCmd.accesskey;" command="cmd_markAllRead"/>
|
||||
<menuseparator/>
|
||||
<menuitem type="checkbox" id="markFlaggedToolbarItem" label="&markStarredCmd.label;" accesskey="&markStarredCmd.accesskey;"
|
||||
<menuitem type="checkbox" id="markFlaggedToolbarItem" label="&markStarredCmd.label;" accesskey="&markStarredCmd.accesskey;"
|
||||
key="key_toggleFlagged" command="cmd_markAsFlagged"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
@ -2103,26 +2103,26 @@
|
|||
<toolbarbutton class="toolbarbutton-1" id="button-stop" label="&stopButton.label;" tooltiptext="&stopButton.tooltip;" command="cmd_stop"/>
|
||||
|
||||
<toolbaritem id="search-container" title="&searchItem.title;" align="center" class="chromeclass-toolbar-additional">
|
||||
<textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onclick="onSearchInputClick(event);"
|
||||
<textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onclick="onSearchInputClick(event);"
|
||||
onmousedown="onSearchInputMousedown(event);" onblur="onSearchInputBlur(event);"
|
||||
oninput="onSearchInput(false);" onkeypress="onSearchKeyPress(event);">
|
||||
<button id="quick-search-button" type="menu">
|
||||
<menupopup id="quick-search-menupopup" value="2" persist="value" onpopupshowing="InitQuickSearchPopup();" popupalign="topleft" popupanchor="bottomleft">
|
||||
<menuitem value="0" label="&searchSubjectMenu.label;" type="radio"
|
||||
<menuitem value="0" label="&searchSubjectMenu.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="1" label="&searchFromMenu.label;" type="radio"
|
||||
<menuitem value="1" label="&searchFromMenu.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)" />
|
||||
<menuitem value="2" label="&searchSubjectOrFromMenu.label;" type="radio"
|
||||
<menuitem value="2" label="&searchSubjectOrFromMenu.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="5" label="&searchRecipient.label;" type="radio"
|
||||
<menuitem value="5" label="&searchRecipient.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuitem value="3" label="&searchMessageBody.label;" type="radio"
|
||||
<menuitem value="3" label="&searchMessageBody.label;" type="radio"
|
||||
oncommand="changeQuickSearchMode(this)"/>
|
||||
<menuseparator/>
|
||||
<!-- if the value for the save as virtual folder menu changes, please update the
|
||||
<!-- if the value for the save as virtual folder menu changes, please update the
|
||||
VK_DOWN key handler in searchbar.xml
|
||||
-->
|
||||
<menuitem value="5" id="quickSearchSaveAsVirtualFolder" label="&saveAsVirtualFolderMenu.label;"
|
||||
<menuitem value="5" id="quickSearchSaveAsVirtualFolder" label="&saveAsVirtualFolderMenu.label;"
|
||||
oncommand="saveViewAsVirtualFolder()"/>
|
||||
</menupopup>
|
||||
</button>
|
||||
|
@ -2134,11 +2134,11 @@
|
|||
<!--XXX The src attribute is there to give the menulist icon horizontal margin (bug 381364).
|
||||
Remove it once bug 381548 is fixed. -->
|
||||
<menulist id="locationFolders" class="folderMenuItem" label=" " src="" context="folderPaneContext" width="170" crop="center">
|
||||
<menupopup id="folderLocationPopup" class="folderLocationPopup" height="400" flex="1"
|
||||
<menupopup id="folderLocationPopup" class="folderLocationPopup" height="400" flex="1"
|
||||
oncommand="OnLocationTreeSelect(this);"/>
|
||||
</menulist>
|
||||
</toolbaritem>
|
||||
|
||||
|
||||
<toolbaritem id="mailviews-container" title="&mailViewsToolbarItem.title;" align="center" class="chromeclass-toolbar-additional">
|
||||
<label value="&viewPicker.label;" control="viewPicker" accesskey="&viewPicker.accesskey;"/>
|
||||
<menulist id="viewPicker" oncommand="ViewChangeByMenuitem(event.target);">
|
||||
|
@ -2163,13 +2163,13 @@
|
|||
</menulist>
|
||||
</toolbaritem>
|
||||
</toolbarpalette>
|
||||
|
||||
|
||||
<!-- If changes are made to the default set of toolbar buttons, you may need to rev the id
|
||||
of mail-bar in order to force the new default items to show up for users who customized their toolbar
|
||||
in earlier versions. Bumping the id means users will have to re-customize their toolbar!
|
||||
-->
|
||||
<toolbar id="mail-bar2" class="toolbar-primary chromeclass-toolbar"
|
||||
toolbarname="Mail"
|
||||
toolbarname="Mail"
|
||||
fullscreentoolbar="true" mode="full"
|
||||
customizable="true"
|
||||
context="toolbar-context-menu"
|
||||
|
@ -2182,8 +2182,8 @@
|
|||
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
|
||||
</toolbox>
|
||||
|
||||
<!-- The msgNotificationBar appears on top of the message and displays
|
||||
information like: junk, contains remote images, or is a suspected phishing URL
|
||||
<!-- The msgNotificationBar appears on top of the message and displays
|
||||
information like: junk, contains remote images, or is a suspected phishing URL
|
||||
-->
|
||||
|
||||
<deck id="msgNotificationBar" selectedIndex="0" collapsed="true">
|
||||
|
@ -2234,6 +2234,6 @@
|
|||
</stack>
|
||||
</statusbarpanel>
|
||||
</hbox>
|
||||
</statusbar>
|
||||
</statusbar>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -71,11 +71,11 @@ var folderListener = {
|
|||
},
|
||||
|
||||
OnItemPropertyChanged: function(item, property, oldValue, newValue) {},
|
||||
OnItemIntPropertyChanged: function(item, property, oldValue, newValue) {
|
||||
OnItemIntPropertyChanged: function(item, property, oldValue, newValue) {
|
||||
if (item.Value == gCurrentFolderUri) {
|
||||
if (property.toString() == "TotalMessages" || property.toString() == "TotalUnreadMessages") {
|
||||
UpdateStandAloneMessageCounts();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) {},
|
||||
|
@ -100,14 +100,14 @@ var folderListener = {
|
|||
if (gRerootOnFolderLoadForStandAlone) {
|
||||
RerootFolderForStandAlone(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (eventType == "JunkStatusChanged") {
|
||||
HandleJunkStatusChanged(folder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var messagepaneObserver = {
|
||||
|
@ -116,20 +116,20 @@ var messagepaneObserver = {
|
|||
|
||||
onDrop: function (aEvent, aData, aDragSession)
|
||||
{
|
||||
var sourceUri = aData.data;
|
||||
var sourceUri = aData.data;
|
||||
if (sourceUri != gCurrentMessageUri)
|
||||
{
|
||||
SelectFolder(GetMsgHdrFromUri(sourceUri).folder.URI);
|
||||
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");
|
||||
|
@ -142,7 +142,7 @@ var messagepaneObserver = {
|
|||
var elem = doc.getElementById("messengerWindow");
|
||||
return (elem && (elem.getAttribute("windowtype") == "mail:3pane"));
|
||||
},
|
||||
|
||||
|
||||
getSupportedFlavours: function ()
|
||||
{
|
||||
var flavourSet = new FlavourSet();
|
||||
|
@ -161,7 +161,7 @@ function UpdateStandAloneMessageCounts()
|
|||
observerService.notifyObservers(window, "mail:updateStandAloneMessageCounts", "");
|
||||
}
|
||||
|
||||
nsMsgDBViewCommandUpdater.prototype =
|
||||
nsMsgDBViewCommandUpdater.prototype =
|
||||
{
|
||||
updateCommandStatus : function()
|
||||
{
|
||||
|
@ -191,22 +191,22 @@ nsMsgDBViewCommandUpdater.prototype =
|
|||
if (iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
|
||||
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
}
|
||||
}
|
||||
|
||||
function HandleDeleteOrMoveMsgCompleted(folder)
|
||||
{
|
||||
var folderResource = folder.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
if (!folderResource)
|
||||
return;
|
||||
var folderResource = folder.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
if (!folderResource)
|
||||
return;
|
||||
|
||||
if ((folderResource.Value == gCurrentFolderUri) && gCurrentMessageIsDeleted)
|
||||
{
|
||||
if ((folderResource.Value == gCurrentFolderUri) && gCurrentMessageIsDeleted)
|
||||
{
|
||||
gDBView.onDeleteCompleted(true);
|
||||
gCurrentMessageIsDeleted = false;
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
{
|
||||
var nextMstKey = gDBView.getKeyAt(gNextMessageViewIndexAfterDelete);
|
||||
if (nextMstKey != nsMsgKey_None) {
|
||||
|
@ -221,7 +221,7 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
// close the stand alone window because there are no more messages in the folder
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function HandleDeleteOrMoveMsgFailed(folder)
|
||||
|
@ -295,8 +295,8 @@ function delayedOnLoadMessageWindow()
|
|||
if (messageUri instanceof Components.interfaces.nsIMsgMailNewsUrl)
|
||||
folder = messageUri.folder;
|
||||
}
|
||||
}
|
||||
catch(ex)
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
folder = null;
|
||||
dump("## ex=" + ex + "\n");
|
||||
|
@ -314,12 +314,12 @@ function delayedOnLoadMessageWindow()
|
|||
gCurrentFolderUri = folder ? folder.URI : null;
|
||||
|
||||
if (window.arguments[2])
|
||||
originalView = window.arguments[2];
|
||||
originalView = window.arguments[2];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
CreateView(originalView);
|
||||
|
||||
|
||||
gPhishingDetector.init();
|
||||
|
||||
// initialize the customizeDone method on the customizeable toolbar
|
||||
|
@ -330,7 +330,7 @@ function delayedOnLoadMessageWindow()
|
|||
toolbox.toolbarset = toolbarset;
|
||||
|
||||
setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage);
|
||||
|
||||
|
||||
SetupCommandUpdateHandlers();
|
||||
}
|
||||
|
||||
|
@ -343,12 +343,12 @@ function OnLoadMessageWindowDelayed(loadCustomMessage)
|
|||
}
|
||||
else
|
||||
{
|
||||
var msgKey = extractMsgKeyFromURI(gCurrentMessageUri);
|
||||
var msgKey = extractMsgKeyFromURI(gCurrentMessageUri);
|
||||
LoadMessageByViewIndex(gDBView.findIndexFromKey(msgKey, true));
|
||||
}
|
||||
gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;
|
||||
gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;
|
||||
UpdateStandAloneMessageCounts();
|
||||
|
||||
|
||||
// set focus to the message pane
|
||||
window.content.focus();
|
||||
|
||||
|
@ -363,7 +363,7 @@ function CreateView(originalView)
|
|||
{
|
||||
var msgFolder = GetLoadedMsgFolder();
|
||||
|
||||
// extract the sort type, the sort order,
|
||||
// extract the sort type, the sort order,
|
||||
var sortType;
|
||||
var sortOrder;
|
||||
var viewFlags;
|
||||
|
@ -392,14 +392,14 @@ function CreateView(originalView)
|
|||
}
|
||||
else
|
||||
{
|
||||
// this is a hack to make opening a stand-alone msg window on a
|
||||
// this is a hack to make opening a stand-alone msg window on a
|
||||
// .eml file work. We use a search view since its much more tolerant
|
||||
// of not having a folder.
|
||||
viewType = nsMsgViewType.eShowSearch;
|
||||
}
|
||||
|
||||
// create a db view
|
||||
CreateBareDBView(originalView, msgFolder, viewType, viewFlags, sortType, sortOrder);
|
||||
CreateBareDBView(originalView, msgFolder, viewType, viewFlags, sortType, sortOrder);
|
||||
|
||||
var uri;
|
||||
if (gCurrentMessageUri)
|
||||
|
@ -444,38 +444,38 @@ function HideToolbarButtons()
|
|||
var defaultSet = mailToolbar.getAttribute("defaultset");
|
||||
defaultSet = defaultSet.replace(/search-container/i, "");
|
||||
mailToolbar.setAttribute('defaultset', defaultSet);
|
||||
|
||||
|
||||
var searchContainer = document.getElementById('search-container');
|
||||
if (searchContainer)
|
||||
searchContainer.parentNode.removeChild(searchContainer);
|
||||
|
||||
|
||||
// now hack the toolbar palette to remove all of the toolbar items which don't
|
||||
// make sense for the stand alone message window. This prevents them from showing up in the
|
||||
// make sense for the stand alone message window. This prevents them from showing up in the
|
||||
// customize dialog.
|
||||
var toolbarPalette = document.getElementById('mail-toolbox').palette;
|
||||
toolbarPalette.removeChild(toolbarPalette.getElementsByAttribute('id', 'search-container')[0]);
|
||||
toolbarPalette.removeChild(toolbarPalette.getElementsByAttribute('id', 'mailviews-container')[0]);
|
||||
toolbarPalette.removeChild(toolbarPalette.getElementsByAttribute('id', 'folder-location-container')[0]);
|
||||
toolbarPalette.removeChild(toolbarPalette.getElementsByAttribute('id', 'folder-location-container')[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function HideMenus()
|
||||
{
|
||||
var message_menuitem=document.getElementById('menu_showMessage');
|
||||
if (message_menuitem)
|
||||
message_menuitem.setAttribute("hidden", "true");
|
||||
var message_menuitem=document.getElementById('menu_showMessage');
|
||||
if (message_menuitem)
|
||||
message_menuitem.setAttribute("hidden", "true");
|
||||
|
||||
var showSearch_showMessage_Separator = document.getElementById('menu_showSearch_showMessage_Separator');
|
||||
if (showSearch_showMessage_Separator)
|
||||
showSearch_showMessage_Separator.setAttribute("hidden", "true");
|
||||
var showSearch_showMessage_Separator = document.getElementById('menu_showSearch_showMessage_Separator');
|
||||
if (showSearch_showMessage_Separator)
|
||||
showSearch_showMessage_Separator.setAttribute("hidden", "true");
|
||||
|
||||
var expandOrCollapseMenu = document.getElementById('menu_expandOrCollapse');
|
||||
if (expandOrCollapseMenu)
|
||||
expandOrCollapseMenu.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 renameFolderMenu = document.getElementById('menu_renameFolder');
|
||||
if (renameFolderMenu)
|
||||
renameFolderMenu.setAttribute("hidden", "true");
|
||||
|
||||
var viewLayoutMenu = document.getElementById("menu_MessagePaneLayout");
|
||||
if (viewLayoutMenu)
|
||||
|
@ -485,41 +485,41 @@ function HideMenus()
|
|||
if (viewFolderMenu)
|
||||
viewFolderMenu.setAttribute("hidden", "true");
|
||||
|
||||
var viewMessagesMenu = document.getElementById('viewMessagesMenu');
|
||||
if (viewMessagesMenu)
|
||||
viewMessagesMenu.setAttribute("hidden", "true");
|
||||
var viewMessagesMenu = document.getElementById('viewMessagesMenu');
|
||||
if (viewMessagesMenu)
|
||||
viewMessagesMenu.setAttribute("hidden", "true");
|
||||
|
||||
var viewMessageViewMenu = document.getElementById('viewMessageViewMenu');
|
||||
if (viewMessageViewMenu)
|
||||
viewMessageViewMenu.setAttribute("hidden", "true");
|
||||
var viewMessageViewMenu = document.getElementById('viewMessageViewMenu');
|
||||
if (viewMessageViewMenu)
|
||||
viewMessageViewMenu.setAttribute("hidden", "true");
|
||||
|
||||
var viewMessagesMenuSeparator = document.getElementById('viewMessagesMenuSeparator');
|
||||
if (viewMessagesMenuSeparator)
|
||||
viewMessagesMenuSeparator.setAttribute("hidden", "true");
|
||||
var viewMessagesMenuSeparator = document.getElementById('viewMessagesMenuSeparator');
|
||||
if (viewMessagesMenuSeparator)
|
||||
viewMessagesMenuSeparator.setAttribute("hidden", "true");
|
||||
|
||||
var openMessageMenu = document.getElementById('openMessageWindowMenuitem');
|
||||
if (openMessageMenu)
|
||||
openMessageMenu.setAttribute("hidden", "true");
|
||||
var openMessageMenu = document.getElementById('openMessageWindowMenuitem');
|
||||
if (openMessageMenu)
|
||||
openMessageMenu.setAttribute("hidden", "true");
|
||||
|
||||
var viewSortMenuSeparator = document.getElementById('viewSortMenuSeparator');
|
||||
if (viewSortMenuSeparator)
|
||||
viewSortMenuSeparator.setAttribute("hidden", "true");
|
||||
|
||||
var viewSortMenu = document.getElementById('viewSortMenu');
|
||||
if (viewSortMenu)
|
||||
viewSortMenu.setAttribute("hidden", "true");
|
||||
var viewSortMenu = document.getElementById('viewSortMenu');
|
||||
if (viewSortMenu)
|
||||
viewSortMenu.setAttribute("hidden", "true");
|
||||
|
||||
var emptryTrashMenu = document.getElementById('menu_emptyTrash');
|
||||
if (emptryTrashMenu)
|
||||
emptryTrashMenu.setAttribute("hidden", "true");
|
||||
var emptryTrashMenu = document.getElementById('menu_emptyTrash');
|
||||
if (emptryTrashMenu)
|
||||
emptryTrashMenu.setAttribute("hidden", "true");
|
||||
|
||||
var menuPropertiesSeparator = document.getElementById("editPropertiesSeparator");
|
||||
if (menuPropertiesSeparator)
|
||||
menuPropertiesSeparator.setAttribute("hidden", "true");
|
||||
|
||||
var menuProperties = document.getElementById('menu_properties');
|
||||
if (menuProperties)
|
||||
menuProperties.setAttribute("hidden", "true");
|
||||
var menuProperties = document.getElementById('menu_properties');
|
||||
if (menuProperties)
|
||||
menuProperties.setAttribute("hidden", "true");
|
||||
|
||||
var favoriteFolder = document.getElementById('menu_favoriteFolder');
|
||||
if (favoriteFolder)
|
||||
|
@ -528,35 +528,35 @@ function HideMenus()
|
|||
favoriteFolder.setAttribute("hidden", "true");
|
||||
}
|
||||
|
||||
var compactFolderMenu = document.getElementById('menu_compactFolder');
|
||||
if (compactFolderMenu)
|
||||
compactFolderMenu.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");
|
||||
var trashSeparator = document.getElementById('trashMenuSeparator');
|
||||
if (trashSeparator)
|
||||
trashSeparator.setAttribute("hidden", "true");
|
||||
|
||||
var goStartPageSeparator = document.getElementById('goNextSeparator');
|
||||
if (goStartPageSeparator)
|
||||
goStartPageSeparator.hidden = true;
|
||||
var goStartPageSeparator = document.getElementById('goNextSeparator');
|
||||
if (goStartPageSeparator)
|
||||
goStartPageSeparator.hidden = true;
|
||||
|
||||
var goStartPage = document.getElementById('goStartPage');
|
||||
if (goStartPage)
|
||||
if (goStartPage)
|
||||
goStartPage.hidden = true;
|
||||
}
|
||||
|
||||
function OnUnloadMessageWindow()
|
||||
{
|
||||
// FIX ME - later we will be able to use onunload from the overlay
|
||||
OnUnloadMsgHeaderPane();
|
||||
// FIX ME - later we will be able to use onunload from the overlay
|
||||
OnUnloadMsgHeaderPane();
|
||||
gPhishingDetector.shutdown();
|
||||
OnMailWindowUnload();
|
||||
OnMailWindowUnload();
|
||||
}
|
||||
|
||||
function CreateMessageWindowGlobals()
|
||||
{
|
||||
gCompositeDataSource = Components.classes[compositeDataSourceContractID].createInstance();
|
||||
gCompositeDataSource = gCompositeDataSource.QueryInterface(Components.interfaces.nsIRDFCompositeDataSource);
|
||||
gCompositeDataSource = Components.classes[compositeDataSourceContractID].createInstance();
|
||||
gCompositeDataSource = gCompositeDataSource.QueryInterface(Components.interfaces.nsIRDFCompositeDataSource);
|
||||
}
|
||||
|
||||
function InitializeDataSources()
|
||||
|
@ -572,38 +572,38 @@ function GetSelectedMsgFolders()
|
|||
var folderArray = new Array(1);
|
||||
var msgFolder = GetLoadedMsgFolder();
|
||||
if (msgFolder)
|
||||
folderArray[0] = msgFolder;
|
||||
folderArray[0] = msgFolder;
|
||||
|
||||
return folderArray;
|
||||
}
|
||||
|
||||
function GetFirstSelectedMessage()
|
||||
{
|
||||
return GetLoadedMessage();
|
||||
return GetLoadedMessage();
|
||||
}
|
||||
|
||||
function GetNumSelectedMessages()
|
||||
{
|
||||
if (gCurrentMessageUri)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
if (gCurrentMessageUri)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
function GetSelectedMessages()
|
||||
{
|
||||
var messageArray = new Array(1);
|
||||
var message = GetLoadedMessage();
|
||||
if (message)
|
||||
messageArray[0] = message;
|
||||
var messageArray = new Array(1);
|
||||
var message = GetLoadedMessage();
|
||||
if (message)
|
||||
messageArray[0] = message;
|
||||
|
||||
return messageArray;
|
||||
return messageArray;
|
||||
}
|
||||
|
||||
function GetSelectedIndices(dbView)
|
||||
{
|
||||
try {
|
||||
var indicesArray = {};
|
||||
var indicesArray = {};
|
||||
var length = {};
|
||||
dbView.getIndicesForSelection(indicesArray,length);
|
||||
return indicesArray.value;
|
||||
|
@ -641,7 +641,7 @@ function ClearMessageSelection()
|
|||
|
||||
function GetCompositeDataSource(command)
|
||||
{
|
||||
return gCompositeDataSource;
|
||||
return gCompositeDataSource;
|
||||
}
|
||||
|
||||
function SetNextMessageAfterDelete()
|
||||
|
@ -659,13 +659,13 @@ function SelectFolder(folderUri)
|
|||
return;
|
||||
|
||||
// close old folder view
|
||||
var dbview = GetDBView();
|
||||
var dbview = GetDBView();
|
||||
if (dbview)
|
||||
dbview.close();
|
||||
dbview.close();
|
||||
|
||||
gCurrentFolderToRerootForStandAlone = folderUri;
|
||||
msgWindow.openFolder = msgfolder;
|
||||
|
||||
|
||||
if (msgfolder.manyHeadersToDownload)
|
||||
{
|
||||
gRerootOnFolderLoadForStandAlone = true;
|
||||
|
@ -691,7 +691,7 @@ function SelectFolder(folderUri)
|
|||
//Need to do this after rerooting folder. Otherwise possibility of receiving folder loaded
|
||||
//notification before folder has actually changed.
|
||||
msgfolder.updateFolder(msgWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function RerootFolderForStandAlone(uri)
|
||||
|
@ -700,7 +700,7 @@ function RerootFolderForStandAlone(uri)
|
|||
|
||||
// create new folder view
|
||||
CreateView(null);
|
||||
|
||||
|
||||
if (gMessageToLoad != nsMsgKey_None)
|
||||
{
|
||||
LoadMessageByMsgKey(gMessageToLoad);
|
||||
|
@ -712,15 +712,15 @@ function RerootFolderForStandAlone(uri)
|
|||
gNextMessageAfterLoad = null;
|
||||
LoadMessageByNavigationType(type);
|
||||
}
|
||||
|
||||
|
||||
SetUpToolbarButtons(gCurrentFolderUri);
|
||||
|
||||
|
||||
UpdateMailToolbar("reroot folder in stand alone window");
|
||||
|
||||
|
||||
// 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 GetMsgHdrFromUri(messageUri)
|
||||
{
|
||||
|
@ -732,7 +732,7 @@ function SelectMessage(messageUri)
|
|||
var msgHdr = GetMsgHdrFromUri(messageUri);
|
||||
LoadMessageByMsgKey(msgHdr.messageKey);
|
||||
}
|
||||
|
||||
|
||||
function ReloadMessage()
|
||||
{
|
||||
gDBView.reloadMessage();
|
||||
|
@ -744,14 +744,14 @@ function MsgDeleteMessageFromMessageWindow(reallyDelete, fromToolbar)
|
|||
// only allow cancel from the menu: "Edit | Cancel / Delete Message"
|
||||
if (fromToolbar)
|
||||
{
|
||||
if (isNewsURI(gCurrentFolderUri))
|
||||
if (isNewsURI(gCurrentFolderUri))
|
||||
{
|
||||
// if news, don't delete
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// before we delete
|
||||
|
||||
// before we delete
|
||||
SetNextMessageAfterDelete();
|
||||
|
||||
if (reallyDelete)
|
||||
|
@ -837,111 +837,111 @@ var MessageWindowController =
|
|||
case "cmd_createFilterFromPopup":
|
||||
case "cmd_createFilterFromMenu":
|
||||
case "cmd_moveToFolderAgain":
|
||||
return true;
|
||||
return true;
|
||||
case "cmd_synchronizeOffline":
|
||||
case "cmd_downloadFlagged":
|
||||
case "cmd_downloadSelected":
|
||||
case "cmd_downloadFlagged":
|
||||
case "cmd_downloadSelected":
|
||||
return MailOfflineMgr.isOnline();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
isCommandEnabled: function(command)
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
isCommandEnabled: function(command)
|
||||
{
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_createFilterFromPopup":
|
||||
case "cmd_createFilterFromMenu":
|
||||
var loadedFolder = GetLoadedMsgFolder();
|
||||
if (!(loadedFolder && loadedFolder.server.canHaveFilters))
|
||||
return false;
|
||||
case "cmd_delete":
|
||||
case "cmd_delete":
|
||||
UpdateDeleteCommand();
|
||||
// fall through
|
||||
case "button_delete":
|
||||
case "cmd_shiftDelete":
|
||||
case "button_delete":
|
||||
case "cmd_shiftDelete":
|
||||
var loadedFolder = GetLoadedMsgFolder();
|
||||
return gCurrentMessageUri && loadedFolder && (loadedFolder.canDeleteMessages || isNewsURI(gCurrentFolderUri));
|
||||
case "button_junk":
|
||||
UpdateJunkToolbarButton();
|
||||
// fall through
|
||||
case "cmd_markAsJunk":
|
||||
case "cmd_markAsNotJunk":
|
||||
case "cmd_markAsNotJunk":
|
||||
case "cmd_recalculateJunkScore":
|
||||
// can't do junk on news yet
|
||||
return (!isNewsURI(gCurrentFolderUri));
|
||||
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 "cmd_printpreview":
|
||||
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 "cmd_printpreview":
|
||||
case "button_print":
|
||||
case "cmd_saveAsFile":
|
||||
case "cmd_saveAsTemplate":
|
||||
case "cmd_viewPageSource":
|
||||
case "cmd_reload":
|
||||
case "cmd_find":
|
||||
case "cmd_tag":
|
||||
case "cmd_saveAsFile":
|
||||
case "cmd_saveAsTemplate":
|
||||
case "cmd_viewPageSource":
|
||||
case "cmd_reload":
|
||||
case "cmd_find":
|
||||
case "cmd_tag":
|
||||
case "button_mark":
|
||||
case "cmd_markAsRead":
|
||||
case "cmd_markAllRead":
|
||||
case "cmd_markThreadAsRead":
|
||||
case "cmd_markAsRead":
|
||||
case "cmd_markAllRead":
|
||||
case "cmd_markThreadAsRead":
|
||||
case "cmd_markReadByDate":
|
||||
return(true);
|
||||
case "cmd_markAsFlagged":
|
||||
case "cmd_markAsFlagged":
|
||||
case "button_file":
|
||||
case "cmd_file":
|
||||
return ( gCurrentMessageUri != null);
|
||||
case "cmd_printSetup":
|
||||
return true;
|
||||
case "cmd_getNewMessages":
|
||||
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":
|
||||
return IsGetNewMessagesEnabled();
|
||||
case "cmd_getNextNMessages":
|
||||
return IsGetNextNMessagesEnabled();
|
||||
case "cmd_downloadFlagged":
|
||||
case "cmd_downloadSelected":
|
||||
case "cmd_synchronizeOffline":
|
||||
return MailOfflineMgr.isOnline();
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_settingsOffline":
|
||||
return IsAccountOfflineEnabled();
|
||||
case "cmd_close":
|
||||
case "cmd_nextMsg":
|
||||
case "cmd_close":
|
||||
case "cmd_nextMsg":
|
||||
case "button_next":
|
||||
case "cmd_nextUnreadMsg":
|
||||
case "cmd_nextUnreadThread":
|
||||
case "cmd_nextUnreadMsg":
|
||||
case "cmd_nextUnreadThread":
|
||||
case "button_previous":
|
||||
case "cmd_previousMsg":
|
||||
case "cmd_previousUnreadMsg":
|
||||
return true;
|
||||
case "cmd_findAgain":
|
||||
case "cmd_findPrevious":
|
||||
case "cmd_previousMsg":
|
||||
case "cmd_previousUnreadMsg":
|
||||
return true;
|
||||
case "cmd_findAgain":
|
||||
case "cmd_findPrevious":
|
||||
case "cmd_goForward":
|
||||
case "cmd_goBack":
|
||||
return true;
|
||||
return true;
|
||||
case "button_goForward":
|
||||
case "button_goBack":
|
||||
case "cmd_goForward":
|
||||
case "cmd_goBack":
|
||||
return gDBView &&
|
||||
gDBView.navigateStatus((command == "cmd_goBack" ||
|
||||
command == "button_goBack")
|
||||
return gDBView &&
|
||||
gDBView.navigateStatus((command == "cmd_goBack" ||
|
||||
command == "button_goBack")
|
||||
? nsMsgNavigationType.back : nsMsgNavigationType.forward);
|
||||
case "cmd_search":
|
||||
var loadedFolder = GetLoadedMsgFolder();
|
||||
if (!loadedFolder)
|
||||
return false;
|
||||
return loadedFolder.server.canSearchMessages;
|
||||
return loadedFolder.server.canSearchMessages;
|
||||
case "cmd_undo":
|
||||
case "cmd_redo":
|
||||
return SetupUndoRedoCommand(command);
|
||||
|
@ -951,27 +951,27 @@ var MessageWindowController =
|
|||
case "cmd_runJunkControls":
|
||||
case "cmd_deleteJunk":
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
doCommand: function(command)
|
||||
{
|
||||
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;
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_close":
|
||||
CloseMailWindow();
|
||||
break;
|
||||
case "cmd_getNewMessages":
|
||||
MsgGetMessage();
|
||||
break;
|
||||
case "cmd_undo":
|
||||
messenger.undo(msgWindow);
|
||||
break;
|
||||
|
@ -982,111 +982,111 @@ var MessageWindowController =
|
|||
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;
|
||||
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_moveToFolderAgain":
|
||||
var folderId = pref.getCharPref("mail.last_msg_movecopy_target_uri");
|
||||
if (pref.getBoolPref("mail.last_msg_movecopy_was_move"))
|
||||
MsgMoveMessage(folderId);
|
||||
else
|
||||
MsgCopyMessage(folderId);
|
||||
break;
|
||||
break;
|
||||
case "cmd_createFilterFromPopup":
|
||||
break;// This does nothing because the createfilter is invoked from the popupnode oncommand.
|
||||
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;
|
||||
break;
|
||||
case "cmd_delete":
|
||||
MsgDeleteMessageFromMessageWindow(false, false);
|
||||
break;
|
||||
case "cmd_shiftDelete":
|
||||
MsgDeleteMessageFromMessageWindow(true, false);
|
||||
break;
|
||||
case "button_junk":
|
||||
MsgJunk();
|
||||
break;
|
||||
case "button_delete":
|
||||
MsgDeleteMessageFromMessageWindow(false, true);
|
||||
break;
|
||||
case "cmd_printSetup":
|
||||
PrintUtils.showPageSetup();
|
||||
break;
|
||||
case "cmd_print":
|
||||
PrintEnginePrint();
|
||||
break;
|
||||
case "cmd_printpreview":
|
||||
PrintEnginePrintPreview();
|
||||
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(false);
|
||||
break;
|
||||
case "cmd_findPrevious":
|
||||
MsgFindAgain(true);
|
||||
break;
|
||||
case "button_delete":
|
||||
MsgDeleteMessageFromMessageWindow(false, true);
|
||||
break;
|
||||
case "cmd_printSetup":
|
||||
PrintUtils.showPageSetup();
|
||||
break;
|
||||
case "cmd_print":
|
||||
PrintEnginePrint();
|
||||
break;
|
||||
case "cmd_printpreview":
|
||||
PrintEnginePrintPreview();
|
||||
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(false);
|
||||
break;
|
||||
case "cmd_findPrevious":
|
||||
MsgFindAgain(true);
|
||||
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_markAsRead":
|
||||
MsgMarkMsgAsRead(null);
|
||||
return;
|
||||
case "cmd_markThreadAsRead":
|
||||
MsgMarkThreadAsRead();
|
||||
return;
|
||||
case "cmd_markAllRead":
|
||||
MsgMarkAllRead();
|
||||
return;
|
||||
case "cmd_markReadByDate":
|
||||
MsgMarkReadByDate();
|
||||
return;
|
||||
case "cmd_markAsFlagged":
|
||||
MsgMarkAsFlagged(null);
|
||||
return;
|
||||
case "cmd_markAsJunk":
|
||||
case "cmd_markAsFlagged":
|
||||
MsgMarkAsFlagged(null);
|
||||
return;
|
||||
case "cmd_markAsJunk":
|
||||
JunkSelectedMessages(true);
|
||||
return;
|
||||
case "cmd_markAsNotJunk":
|
||||
return;
|
||||
case "cmd_markAsNotJunk":
|
||||
JunkSelectedMessages(false);
|
||||
return;
|
||||
return;
|
||||
case "cmd_recalculateJunkScore":
|
||||
analyzeMessagesForJunk();
|
||||
return;
|
||||
|
@ -1106,22 +1106,22 @@ var MessageWindowController =
|
|||
case "button_next":
|
||||
performNavigation(nsMsgNavigationType.nextUnreadMessage);
|
||||
break;
|
||||
case "cmd_nextUnreadThread":
|
||||
case "cmd_nextUnreadThread":
|
||||
performNavigation(nsMsgNavigationType.nextUnreadThread);
|
||||
break;
|
||||
case "cmd_nextMsg":
|
||||
break;
|
||||
case "cmd_nextMsg":
|
||||
performNavigation(nsMsgNavigationType.nextMessage);
|
||||
break;
|
||||
case "cmd_nextFlaggedMsg":
|
||||
break;
|
||||
case "cmd_nextFlaggedMsg":
|
||||
performNavigation(nsMsgNavigationType.nextFlagged);
|
||||
break;
|
||||
case "cmd_previousMsg":
|
||||
break;
|
||||
case "cmd_previousMsg":
|
||||
performNavigation(nsMsgNavigationType.previousMessage);
|
||||
break;
|
||||
break;
|
||||
case "button_previous":
|
||||
case "cmd_previousUnreadMsg":
|
||||
performNavigation(nsMsgNavigationType.previousUnreadMessage);
|
||||
break;
|
||||
break;
|
||||
case "cmd_previousFlaggedMsg":
|
||||
performNavigation(nsMsgNavigationType.previousFlagged);
|
||||
break;
|
||||
|
@ -1132,11 +1132,11 @@ var MessageWindowController =
|
|||
performNavigation(nsMsgNavigationType.back);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
onEvent: function(event)
|
||||
{
|
||||
}
|
||||
},
|
||||
|
||||
onEvent: function(event)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
function LoadMessageByNavigationType(type)
|
||||
|
@ -1148,7 +1148,7 @@ function LoadMessageByNavigationType(type)
|
|||
gDBView.viewNavigate(type, resultId, resultIndex, threadIndex, true /* wrap */);
|
||||
|
||||
// if we found something....display it.
|
||||
if ((resultId.value != nsMsgKey_None) && (resultIndex.value != nsMsgKey_None))
|
||||
if ((resultId.value != nsMsgKey_None) && (resultIndex.value != nsMsgKey_None))
|
||||
{
|
||||
// load the message key
|
||||
LoadMessageByMsgKey(resultId.value);
|
||||
|
@ -1162,20 +1162,20 @@ function LoadMessageByNavigationType(type)
|
|||
// no message found to load
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function performNavigation(type)
|
||||
{
|
||||
// Try to load a message by navigation type if we can find
|
||||
// the message in the same folder.
|
||||
if (LoadMessageByNavigationType(type))
|
||||
return;
|
||||
|
||||
|
||||
CrossFolderNavigation(type);
|
||||
}
|
||||
|
||||
function SetupCommandUpdateHandlers()
|
||||
{
|
||||
top.controllers.insertControllerAt(0, MessageWindowController);
|
||||
top.controllers.insertControllerAt(0, MessageWindowController);
|
||||
}
|
||||
|
||||
function GetDBView()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0"?>
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
@ -37,7 +37,7 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<?xml-stylesheet href="chrome://messenger/skin/messageWindow.css" type="text/css"?>
|
||||
<?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"?>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<!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#"
|
||||
|
@ -98,7 +98,7 @@
|
|||
<commandset id="mailMarkMenuItems"/>
|
||||
<commandset id="mailToolsMenuItems"/>
|
||||
<commandset id="mailEditContextMenuItems"/>
|
||||
<commandset id="tasksCommands"/>
|
||||
<commandset id="tasksCommands"/>
|
||||
<commandset id="commandKeys"/>
|
||||
#ifdef XP_MACOSX
|
||||
<commandset id="macWindowMenuItems"/>
|
||||
|
@ -126,11 +126,11 @@
|
|||
oncommand="SendMailToNode(document.popupNode)"/>
|
||||
<menuitem label="&CopyEmailAddress.label;"
|
||||
accesskey="&CopyEmailAddress.accesskey;"
|
||||
oncommand="CopyEmailAddress(document.popupNode)"/>
|
||||
oncommand="CopyEmailAddress(document.popupNode)"/>
|
||||
<menuitem label="&CreateFilter.label;"
|
||||
accesskey="&CreateFilter.accesskey;"
|
||||
oncommand="CreateFilter(document.popupNode)"
|
||||
observes="cmd_createFilterFromPopup"/>
|
||||
observes="cmd_createFilterFromPopup"/>
|
||||
</popup>
|
||||
|
||||
<popup id="messageIdContext"/>
|
||||
|
@ -148,7 +148,7 @@
|
|||
|
||||
<toolbox id="mail-toolbox" class="toolbox-top">
|
||||
</toolbox>
|
||||
|
||||
|
||||
<!-- msg header view -->
|
||||
<vbox id="messagepanebox" flex="3" persist="collapsed"
|
||||
ondragover="nsDragAndDrop.dragOver(event, messagepaneObserver);"
|
||||
|
@ -159,15 +159,15 @@
|
|||
<hbox id="msgHeaderView"/>
|
||||
|
||||
<!-- message view -->
|
||||
<browser id="messagepane" context="messagePaneContext"
|
||||
style="height: 0px; min-height: 1px" flex="1" name="messagepane"
|
||||
disablesecurity="true" disablehistory="true" type="content-primary"
|
||||
<browser id="messagepane" context="messagePaneContext"
|
||||
style="height: 0px; min-height: 1px" flex="1" name="messagepane"
|
||||
disablesecurity="true" disablehistory="true" type="content-primary"
|
||||
onresize="return messagePaneOnResize(event);" autofind="false"
|
||||
src="about:blank" onclick="return contentAreaClick(event);" />
|
||||
<splitter id="attachment-splitter" collapse="after" resizebefore="closest" resizeafter="closest" collapsed="true"/>
|
||||
<hbox id="attachmentView"/>
|
||||
<findbar id="FindToolbar" browserid="messagepane"/>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
<statusbar class="chromeclass-status" id="status-bar"/>
|
||||
</window>
|
||||
|
|
|
@ -44,15 +44,15 @@
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// Warning: if you go to modify any of these JS routines please get a code review from
|
||||
// scott@scott-macgregor.org. It's critical that the code in here for displaying
|
||||
// the message headers for a selected message remain as fast as possible. In particular,
|
||||
// the message headers for a selected message remain as fast as possible. In particular,
|
||||
// right now, we only introduce one reflow per message. i.e. if you click on a message in the thread
|
||||
// pane, we batch up all the changes for displaying the header pane (to, cc, attachements button, etc.)
|
||||
// pane, we batch up all the changes for displaying the header pane (to, cc, attachements button, etc.)
|
||||
// and we make a single pass to display them. It's critical that we maintain this one reflow per message
|
||||
// view in the message header pane.
|
||||
// view in the message header pane.
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const msgHeaderParserContractID = "@mozilla.org/messenger/headerparser;1";
|
||||
const abAddressCollectorContractID = "@mozilla.org/addressbook/services/addressCollecter;1";
|
||||
const msgHeaderParserContractID = "@mozilla.org/messenger/headerparser;1";
|
||||
const abAddressCollectorContractID = "@mozilla.org/addressbook/services/addressCollecter;1";
|
||||
const kPersonalAddressbookUri = "moz-abmdbdirectory://abook.mab";
|
||||
const kRDFServiceContractID = "@mozilla.org/rdf/rdf-service;1";
|
||||
|
||||
|
@ -98,17 +98,17 @@ var gMessageListeners = new Array;
|
|||
// see in that view. In addition, include information describing how you want that header field to be
|
||||
// presented. i.e. if it's an email address field, if you want a toggle inserted on the node in case
|
||||
// of multiple email addresses, etc. We'll then use this static table to dynamically generate header view entries
|
||||
// which manipulate the UI.
|
||||
// which manipulate the UI.
|
||||
// When you add a header to one of these view lists you can specify the following properties:
|
||||
// name: the name of the header. i.e. "to", "subject". This must be in lower case and the name of the
|
||||
// header is used to help dynamically generate ids for objects in the document. (REQUIRED)
|
||||
// useToggle: true if the values for this header are multiple email addresses and you want a
|
||||
// useToggle: true if the values for this header are multiple email addresses and you want a
|
||||
// a toggle icon to show a short vs. long list (DEFAULT: false)
|
||||
// useShortView: (only works on some fields like From). If the field has a long presentation and a
|
||||
// short presentation we'll use the short one. i.e. if you are showing the From field and you
|
||||
// set this to true, we can show just "John Doe" instead of "John Doe <jdoe@netscape.net>".
|
||||
// (DEFAULT: false)
|
||||
//
|
||||
//
|
||||
// outputFunction: this is a method which takes a headerEntry (see the definition below) and a header value
|
||||
// This allows you to provide your own methods for actually determining how the header value
|
||||
// is displayed. (DEFAULT: updateHeaderValue which just sets the header value on the text node)
|
||||
|
@ -120,7 +120,7 @@ var gCollapsedHeaderList = [ {name:"subject", outputFunction:updateHeaderValueIn
|
|||
{name:"date", outputFunction:updateHeaderValueInTextNode}];
|
||||
|
||||
// We also have an expanded header view. This shows many of your more common (and useful) headers.
|
||||
var gExpandedHeaderList = [ {name:"subject"},
|
||||
var gExpandedHeaderList = [ {name:"subject"},
|
||||
{name:"from", useToggle:true, outputFunction:OutputEmailAddresses},
|
||||
{name:"sender", outputFunction:OutputEmailAddresses},
|
||||
{name:"reply-to", useToggle:true, outputFunction:OutputEmailAddresses},
|
||||
|
@ -136,7 +136,7 @@ var gExpandedHeaderList = [ {name:"subject"},
|
|||
|
||||
// Now, for each view the message pane can generate, we need a global table of headerEntries. These
|
||||
// header entry objects are generated dynamically based on the static date in the header lists (see above)
|
||||
// and elements we find in the DOM based on properties in the header lists.
|
||||
// and elements we find in the DOM based on properties in the header lists.
|
||||
var gCollapsedHeaderView = {};
|
||||
var gExpandedHeaderView = {};
|
||||
|
||||
|
@ -156,7 +156,7 @@ var currentHeaderData = {};
|
|||
// isExternalAttachment --> boolean flag stating whether the attachment is an attachment which is a URL that refers to the attachment location
|
||||
var currentAttachments = new Array();
|
||||
|
||||
// createHeaderEntry --> our constructor method which creates a header Entry
|
||||
// createHeaderEntry --> our constructor method which creates a header Entry
|
||||
// based on an entry in one of the header lists. A header entry is different from a header list.
|
||||
// a header list just describes how you want a particular header to be presented. The header entry
|
||||
// actually has knowledge about the DOM and the actual DOM elements associated with the header.
|
||||
|
@ -203,12 +203,12 @@ function createHeaderEntry(prefix, headerListInfo)
|
|||
|
||||
function initializeHeaderViewTables()
|
||||
{
|
||||
// iterate over each header in our header list arrays and create header entries
|
||||
// iterate over each header in our header list arrays and create header entries
|
||||
// for each one. These header entries are then stored in the appropriate header table
|
||||
var index;
|
||||
for (index = 0; index < gCollapsedHeaderList.length; index++)
|
||||
{
|
||||
gCollapsedHeaderView[gCollapsedHeaderList[index].name] =
|
||||
gCollapsedHeaderView[gCollapsedHeaderList[index].name] =
|
||||
new createHeaderEntry('collapsed', gCollapsedHeaderList[index]);
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ function initializeHeaderViewTables()
|
|||
var headerName = gExpandedHeaderList[index].name;
|
||||
gExpandedHeaderView[headerName] = new createHeaderEntry('expanded', gExpandedHeaderList[index]);
|
||||
}
|
||||
|
||||
|
||||
var extraHeaders = gExtraExpandedHeaders.split(' ');
|
||||
for (index = 0; index < extraHeaders.length; index++)
|
||||
{
|
||||
|
@ -229,7 +229,7 @@ function initializeHeaderViewTables()
|
|||
var organizationEntry = {name:"organization", outputFunction:updateHeaderValue};
|
||||
gExpandedHeaderView[organizationEntry.name] = new createHeaderEntry('expanded', organizationEntry);
|
||||
}
|
||||
|
||||
|
||||
if (gShowUserAgent)
|
||||
{
|
||||
var userAgentEntry = {name:"user-agent", outputFunction:updateHeaderValue};
|
||||
|
@ -248,8 +248,8 @@ function OnLoadMsgHeaderPane()
|
|||
// HACK...force our XBL bindings file to be load before we try to create our first xbl widget....
|
||||
// otherwise we have problems.
|
||||
document.loadBindingDocument('chrome://messenger/content/mailWidgets.xml');
|
||||
|
||||
// load any preferences that at are global with regards to
|
||||
|
||||
// load any preferences that at are global with regards to
|
||||
// displaying a message...
|
||||
gShowUserAgent = pref.getBoolPref("mailnews.headers.showUserAgent");
|
||||
gMinNumberOfHeaders = pref.getIntPref("mailnews.headers.minNumHeaders");
|
||||
|
@ -260,13 +260,13 @@ function OnLoadMsgHeaderPane()
|
|||
gShowMessageId = pref.getBoolPref("mailnews.headers.showMessageId");
|
||||
gExtraExpandedHeaders = pref.getCharPref("mailnews.headers.extraExpandedHeaders");
|
||||
|
||||
// listen to the
|
||||
// listen to the
|
||||
pref.addObserver("mail.showCondensedAddresses", MsgHdrViewObserver, false);
|
||||
|
||||
initializeHeaderViewTables();
|
||||
|
||||
var deckHeaderView = document.getElementById("msgHeaderViewDeck");
|
||||
gCollapsedHeaderViewMode = deckHeaderView.selectedIndex == 0;
|
||||
gCollapsedHeaderViewMode = deckHeaderView.selectedIndex == 0;
|
||||
|
||||
// dispatch an event letting any listeners know that we have loaded the message pane
|
||||
var event = document.createEvent('Events');
|
||||
|
@ -286,7 +286,7 @@ function OnUnloadMsgHeaderPane()
|
|||
headerViewElement.dispatchEvent(event);
|
||||
}
|
||||
|
||||
const MsgHdrViewObserver =
|
||||
const MsgHdrViewObserver =
|
||||
{
|
||||
observe: function(subject, topic, prefName)
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ const MsgHdrViewObserver =
|
|||
};
|
||||
|
||||
// The messageHeaderSink is the class that gets notified of a message's headers as we display the message
|
||||
// through our mime converter.
|
||||
// through our mime converter.
|
||||
|
||||
var messageHeaderSink = {
|
||||
onStartHeaders: function()
|
||||
|
@ -318,12 +318,12 @@ var messageHeaderSink = {
|
|||
else
|
||||
{
|
||||
if (gViewAllHeaders) // if we currently are in view all header mode, rebuild our header view so we remove most of the header data
|
||||
{
|
||||
{
|
||||
hideHeaderView(gExpandedHeaderView);
|
||||
gExpandedHeaderView = {};
|
||||
initializeHeaderViewTables();
|
||||
initializeHeaderViewTables();
|
||||
}
|
||||
|
||||
|
||||
gViewAllHeaders = false;
|
||||
}
|
||||
|
||||
|
@ -340,34 +340,34 @@ var messageHeaderSink = {
|
|||
gMessageListeners[index].onStartHeaders();
|
||||
},
|
||||
|
||||
onEndHeaders: function()
|
||||
onEndHeaders: function()
|
||||
{
|
||||
// WARNING: This is the ONLY routine inside of the message Header Sink that should
|
||||
// WARNING: This is the ONLY routine inside of the message Header Sink that should
|
||||
// trigger a reflow!
|
||||
CheckNotify();
|
||||
|
||||
|
||||
ClearHeaderView(gCollapsedHeaderView);
|
||||
ClearHeaderView(gExpandedHeaderView);
|
||||
|
||||
EnsureSubjectValue(); // make sure there is a subject even if it's empty so we'll show the subject and the twisty
|
||||
|
||||
EnsureSubjectValue(); // make sure there is a subject even if it's empty so we'll show the subject and the twisty
|
||||
|
||||
ShowMessageHeaderPane();
|
||||
UpdateMessageHeaders();
|
||||
ShowEditMessageButton();
|
||||
|
||||
|
||||
for (index in gMessageListeners)
|
||||
gMessageListeners[index].onEndHeaders();
|
||||
},
|
||||
|
||||
|
||||
processHeaders: function(headerNameEnumerator, headerValueEnumerator, dontCollectAddress)
|
||||
{
|
||||
this.onStartHeaders();
|
||||
this.onStartHeaders();
|
||||
|
||||
const kMailboxSeparator = ", ";
|
||||
var index = 0;
|
||||
while (headerNameEnumerator.hasMore())
|
||||
while (headerNameEnumerator.hasMore())
|
||||
{
|
||||
var header = new Object;
|
||||
var header = new Object;
|
||||
header.headerValue = headerValueEnumerator.getNext();
|
||||
header.headerName = headerNameEnumerator.getNext();
|
||||
|
||||
|
@ -376,9 +376,9 @@ var messageHeaderSink = {
|
|||
var lowerCaseHeaderName = header.headerName.toLowerCase();
|
||||
|
||||
// if we have an x-mailer or x-mimeole string, put it in the user-agent slot which we know how to handle
|
||||
// already.
|
||||
// already.
|
||||
if (lowerCaseHeaderName == "x-mailer" || lowerCaseHeaderName == "x-mimeole")
|
||||
lowerCaseHeaderName = "user-agent";
|
||||
lowerCaseHeaderName = "user-agent";
|
||||
|
||||
if (this.mDummyMsgHeader)
|
||||
{
|
||||
|
@ -404,7 +404,7 @@ var messageHeaderSink = {
|
|||
// in this case, we want to append these headers into one.
|
||||
if (lowerCaseHeaderName == 'to' || lowerCaseHeaderName == 'cc')
|
||||
currentHeaderData[lowerCaseHeaderName].headerValue = currentHeaderData[lowerCaseHeaderName].headerValue + ',' + header.headerValue;
|
||||
else {
|
||||
else {
|
||||
// use the index to create a unique header name like:
|
||||
// received5, received6, etc
|
||||
currentHeaderData[lowerCaseHeaderName + index++] = header;
|
||||
|
@ -413,9 +413,9 @@ var messageHeaderSink = {
|
|||
else
|
||||
currentHeaderData[lowerCaseHeaderName] = header;
|
||||
} // while we have more headers to parse
|
||||
|
||||
|
||||
// process message tags as if they were headers in the message
|
||||
SetTagHeader();
|
||||
SetTagHeader();
|
||||
|
||||
if (("from" in currentHeaderData) && ("sender" in currentHeaderData) && msgHeaderParser)
|
||||
{
|
||||
|
@ -429,8 +429,8 @@ var messageHeaderSink = {
|
|||
|
||||
this.onEndHeaders();
|
||||
},
|
||||
|
||||
handleAttachment: function(contentType, url, displayName, uri, isExternalAttachment)
|
||||
|
||||
handleAttachment: function(contentType, url, displayName, uri, isExternalAttachment)
|
||||
{
|
||||
// presentation level change....don't show vcards as external attachments in the UI.
|
||||
// libmime already renders them inline.
|
||||
|
@ -472,7 +472,7 @@ var messageHeaderSink = {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onEndAllAttachments: function()
|
||||
{
|
||||
displayAttachmentsForExpandedView();
|
||||
|
@ -497,7 +497,7 @@ var messageHeaderSink = {
|
|||
},
|
||||
|
||||
onEndMsgHeaders: function(url)
|
||||
{
|
||||
{
|
||||
OnMsgLoaded(url);
|
||||
},
|
||||
|
||||
|
@ -591,7 +591,7 @@ function EnsureSubjectValue()
|
|||
foo.headerValue = "";
|
||||
foo.headerName = 'subject';
|
||||
currentHeaderData[foo.headerName] = foo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CheckNotify()
|
||||
|
@ -606,7 +606,7 @@ function OnTagsChange()
|
|||
SetTagHeader();
|
||||
|
||||
// now update the expanded header view to rebuild the tags,
|
||||
// and then show or hide the tag header box.
|
||||
// and then show or hide the tag header box.
|
||||
if (gBuiltExpandedView)
|
||||
{
|
||||
var headerEntry = gExpandedHeaderView.tags;
|
||||
|
@ -615,7 +615,7 @@ function OnTagsChange()
|
|||
headerEntry.valid = ("tags" in currentHeaderData);
|
||||
if (headerEntry.valid)
|
||||
headerEntry.outputFunction(headerEntry, currentHeaderData.tags.headerValue);
|
||||
|
||||
|
||||
// if we are showing the expanded header view then we may need to collapse or
|
||||
// show the tag header box...
|
||||
if (!gCollapsedHeaderViewMode)
|
||||
|
@ -649,7 +649,7 @@ function hideHeaderView(headerTable)
|
|||
}
|
||||
}
|
||||
|
||||
// make sure that any valid header entry in the table specified is
|
||||
// make sure that any valid header entry in the table specified is
|
||||
// visible
|
||||
function showHeaderView(headerTable)
|
||||
{
|
||||
|
@ -669,7 +669,7 @@ function showHeaderView(headerTable)
|
|||
// enumerate through the list of headers and find the number that are visible
|
||||
// add empty entries if we don't have the minimum number of rows
|
||||
function EnsureMinimumNumberOfHeaders (headerTable)
|
||||
{
|
||||
{
|
||||
if (!gMinNumberOfHeaders) // 0 means we don't have a minimum..do nothing special
|
||||
return;
|
||||
|
||||
|
@ -678,16 +678,16 @@ function EnsureMinimumNumberOfHeaders (headerTable)
|
|||
{
|
||||
if (headerTable[index].valid)
|
||||
numVisibleHeaders ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (numVisibleHeaders < gMinNumberOfHeaders)
|
||||
{
|
||||
{
|
||||
// how many empty headers do we need to add?
|
||||
var numEmptyHeaders = gMinNumberOfHeaders - numVisibleHeaders;
|
||||
|
||||
// we may have already dynamically created our empty rows and we just need to make them visible
|
||||
for (index in headerTable)
|
||||
{
|
||||
{
|
||||
if (index.indexOf("Dummy-Header") == 0 && numEmptyHeaders)
|
||||
{
|
||||
headerTable[index].valid = true;
|
||||
|
@ -731,14 +731,14 @@ function ToggleHeaderView ()
|
|||
// Work around a xul deck bug where the height of the deck is determined by the tallest panel in the deck
|
||||
// even if that panel is not selected...
|
||||
document.getElementById('msgHeaderViewDeck').selectedPanel.collapsed = true;
|
||||
|
||||
UpdateMessageHeaders();
|
||||
|
||||
// select the new panel.
|
||||
|
||||
UpdateMessageHeaders();
|
||||
|
||||
// select the new panel.
|
||||
document.getElementById('msgHeaderViewDeck').selectedIndex = gCollapsedHeaderViewMode ? 0 : 1;
|
||||
|
||||
// Work around a xul deck bug where the height of the deck is determined by the tallest panel in the deck
|
||||
// even if that panel is not selected...
|
||||
// even if that panel is not selected...
|
||||
document.getElementById('msgHeaderViewDeck').selectedPanel.collapsed = false;
|
||||
}
|
||||
|
||||
|
@ -757,7 +757,7 @@ function createNewHeaderView(headerName, label)
|
|||
{
|
||||
var idName = 'expanded' + headerName + 'Box';
|
||||
var newHeader = document.createElement("mail-headerfield");
|
||||
|
||||
|
||||
newHeader.setAttribute('id', idName);
|
||||
newHeader.setAttribute('label', label);
|
||||
newHeader.collapsed = true;
|
||||
|
@ -766,7 +766,7 @@ function createNewHeaderView(headerName, label)
|
|||
var topViewNode = document.getElementById('expandedHeaders');
|
||||
|
||||
topViewNode.appendChild(newHeader);
|
||||
|
||||
|
||||
this.enclosingBox = newHeader;
|
||||
this.isValid = false;
|
||||
this.useToggle = false;
|
||||
|
@ -804,9 +804,9 @@ function UpdateMessageHeaders()
|
|||
}
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
|
||||
if (gCollapsedHeaderViewMode && !gBuiltCollapsedView)
|
||||
{
|
||||
{
|
||||
if (headerName in gCollapsedHeaderView)
|
||||
headerEntry = gCollapsedHeaderView[headerName];
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ function UpdateMessageHeaders()
|
|||
{
|
||||
// hide references header if view all headers mode isn't selected, the pref show references is
|
||||
// deactivated and the currently displayed message isn't a newsgroup posting
|
||||
headerEntry.valid = false;
|
||||
headerEntry.valid = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -858,7 +858,7 @@ function UpdateMessageHeaders()
|
|||
|
||||
// now update the view to make sure the right elements are visible
|
||||
updateHeaderViews();
|
||||
|
||||
|
||||
if ("FinishEmailProcessing" in this)
|
||||
FinishEmailProcessing();
|
||||
}
|
||||
|
@ -870,15 +870,15 @@ function ClearCurrentHeaders()
|
|||
}
|
||||
|
||||
function ShowMessageHeaderPane()
|
||||
{
|
||||
{
|
||||
document.getElementById('msgHeaderView').collapsed = false;
|
||||
|
||||
/* workaround for 39655 */
|
||||
if (gFolderJustSwitched)
|
||||
/* workaround for 39655 */
|
||||
if (gFolderJustSwitched)
|
||||
{
|
||||
var el = document.getElementById("msgHeaderView");
|
||||
el.setAttribute("style", el.getAttribute("style"));
|
||||
gFolderJustSwitched = false;
|
||||
gFolderJustSwitched = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -894,7 +894,7 @@ function HideMessageHeaderPane()
|
|||
}
|
||||
|
||||
function OutputNewsgroups(headerEntry, headerValue)
|
||||
{
|
||||
{
|
||||
headerValue = headerValue.replace(/,/g,", ");
|
||||
updateHeaderValue(headerEntry, headerValue);
|
||||
}
|
||||
|
@ -914,9 +914,9 @@ function OutputMessageIds(headerEntry, headerValue)
|
|||
}
|
||||
|
||||
// OutputEmailAddresses --> knows how to take a comma separated list of email addresses,
|
||||
// extracts them one by one, linkifying each email address into a mailto url.
|
||||
// extracts them one by one, linkifying each email address into a mailto url.
|
||||
// Then we add the link-ified email address to the parentDiv passed in.
|
||||
//
|
||||
//
|
||||
// emailAddresses --> comma separated list of the addresses for this header field
|
||||
|
||||
function OutputEmailAddresses(headerEntry, emailAddresses)
|
||||
|
@ -948,7 +948,7 @@ function OutputEmailAddresses(headerEntry, emailAddresses)
|
|||
updateEmailAddressNode(headerEntry.enclosingBox.emailAddressNode, address);
|
||||
index++;
|
||||
}
|
||||
|
||||
|
||||
if (headerEntry.useToggle)
|
||||
headerEntry.enclosingBox.buildViews();
|
||||
} // if msgheader parser
|
||||
|
@ -961,7 +961,7 @@ function updateEmailAddressNode(emailAddressNode, address)
|
|||
emailAddressNode.setAttribute("fullAddress", address.fullAddress);
|
||||
emailAddressNode.setAttribute("displayName", address.displayName);
|
||||
emailAddressNode.removeAttribute("tooltiptext");
|
||||
|
||||
|
||||
AddExtraAddressProcessing(address.emailAddress, emailAddressNode);
|
||||
}
|
||||
|
||||
|
@ -972,14 +972,14 @@ function updateEmailAddressNode(emailAddressNode, address)
|
|||
|
||||
function AddExtraAddressProcessing(emailAddress, addressNode)
|
||||
{
|
||||
var displayName = addressNode.getAttribute("displayName");
|
||||
|
||||
var displayName = addressNode.getAttribute("displayName");
|
||||
|
||||
if (gShowCondensedEmailAddresses && displayName)
|
||||
{
|
||||
// always show the address for the from and reply-to fields
|
||||
var parentElementId = addressNode.parentNode.id;
|
||||
var condenseName = true;
|
||||
|
||||
|
||||
if (parentElementId == "expandedfromBox" || parentElementId == "expandedreply-toBox")
|
||||
condenseName = false;
|
||||
|
||||
|
@ -989,7 +989,7 @@ function AddExtraAddressProcessing(emailAddress, addressNode)
|
|||
addressNode.setAttribute("tooltiptext", emailAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fillEmailAddressPopup(emailAddressNode)
|
||||
{
|
||||
|
@ -1006,13 +1006,13 @@ function useDisplayNameForAddress(emailAddress)
|
|||
// For now, if the email address is in the personal address book, then consider this user a 'known' user
|
||||
// and use the display name. I could eventually see our rules enlarged to include other local ABs, replicated
|
||||
// LDAP directories, and maybe even domain matches (i.e. any email from someone in my company
|
||||
// should use the friendly display name)
|
||||
// should use the friendly display name)
|
||||
|
||||
if (!gPersonalAddressBookDirectory)
|
||||
{
|
||||
var RDFService = Components.classes[kRDFServiceContractID].getService(Components.interfaces.nsIRDFService);
|
||||
var RDFService = Components.classes[kRDFServiceContractID].getService(Components.interfaces.nsIRDFService);
|
||||
gPersonalAddressBookDirectory = RDFService.GetResource(kPersonalAddressbookUri).QueryInterface(Components.interfaces.nsIAbMDBDirectory);
|
||||
|
||||
|
||||
if (!gPersonalAddressBookDirectory)
|
||||
return false;
|
||||
}
|
||||
|
@ -1029,7 +1029,7 @@ function AddNodeToAddressBook (emailAddressNode)
|
|||
var displayName = emailAddressNode.getAttribute("displayName");
|
||||
window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
|
||||
"",
|
||||
"chrome,resizable=no,titlebar,modal,centerscreen",
|
||||
"chrome,resizable=no,titlebar,modal,centerscreen",
|
||||
{primaryEmail:primaryEmail, displayName:displayName });
|
||||
}
|
||||
}
|
||||
|
@ -1094,11 +1094,11 @@ function createNewAttachmentInfo(contentType, url, displayName, uri, isExternalA
|
|||
|
||||
function dofunc(aFunctionName, aFunctionArg)
|
||||
{
|
||||
if (aFunctionName == "saveAttachment")
|
||||
saveAttachment(aFunctionArg);
|
||||
else if (aFunctionName == "openAttachment")
|
||||
openAttachment(aFunctionArg);
|
||||
else if (aFunctionName == "printAttachment")
|
||||
if (aFunctionName == "saveAttachment")
|
||||
saveAttachment(aFunctionArg);
|
||||
else if (aFunctionName == "openAttachment")
|
||||
openAttachment(aFunctionArg);
|
||||
else if (aFunctionName == "printAttachment")
|
||||
printAttachment(aFunctionArg);
|
||||
else if (aFunctionName == "deleteAttachment")
|
||||
detachAttachment(aFunctionArg, false);
|
||||
|
@ -1108,35 +1108,35 @@ function dofunc(aFunctionName, aFunctionArg)
|
|||
|
||||
function saveAttachment(aAttachment)
|
||||
{
|
||||
messenger.saveAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
messenger.saveAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
aAttachment.messageUri, aAttachment.isExternalAttachment);
|
||||
}
|
||||
|
||||
function openAttachment(aAttachment)
|
||||
{
|
||||
messenger.openAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
messenger.openAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
aAttachment.messageUri, aAttachment.isExternalAttachment);
|
||||
}
|
||||
|
||||
function printAttachment(aAttachment)
|
||||
{
|
||||
/* we haven't implemented the ability to print attachments yet...
|
||||
messenger.printAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
messenger.printAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
aAttachment.messageUri);
|
||||
*/
|
||||
}
|
||||
|
||||
function detachAttachment(aAttachment, aSaveFirst)
|
||||
{
|
||||
messenger.detachAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
messenger.detachAttachment(aAttachment.contentType,
|
||||
aAttachment.url,
|
||||
encodeURIComponent(aAttachment.displayName),
|
||||
aAttachment.messageUri, aSaveFirst);
|
||||
}
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ function CanDetachAttachments()
|
|||
if (canDetach && ("content-type" in currentHeaderData))
|
||||
{
|
||||
var contentType = currentHeaderData["content-type"].headerValue;
|
||||
canDetach = contentType.indexOf("application/x-pkcs7-mime") < 0 &&
|
||||
canDetach = contentType.indexOf("application/x-pkcs7-mime") < 0 &&
|
||||
contentType.indexOf("application/x-pkcs7-signature") < 0;
|
||||
}
|
||||
return canDetach;
|
||||
|
@ -1208,10 +1208,10 @@ function MessageIdClick(node, event)
|
|||
}
|
||||
}
|
||||
|
||||
// this is our onclick handler for the attachment list.
|
||||
// this is our onclick handler for the attachment list.
|
||||
// A double click in a listitem simulates "opening" the attachment....
|
||||
function attachmentListClick(event)
|
||||
{
|
||||
{
|
||||
// we only care about button 0 (left click) events
|
||||
if (event.button != 0) return;
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ function attachmentListClick(event)
|
|||
}
|
||||
|
||||
// on command handlers for the attachment list context menu...
|
||||
// commandPrefix matches one of our existing functions
|
||||
// commandPrefix matches one of our existing functions
|
||||
// (openAttachment, saveAttachment, etc.)
|
||||
function handleAttachmentSelection(commandPrefix)
|
||||
{
|
||||
|
@ -1235,7 +1235,7 @@ function handleAttachmentSelection(commandPrefix)
|
|||
|
||||
// loop over all of the selected attachments...
|
||||
|
||||
// XXX hack alert. If we sit in tight loop and call doFunc for multiple attachments,
|
||||
// XXX hack alert. If we sit in tight loop and call doFunc for multiple attachments,
|
||||
// we get chrome errors in layout as we start loading the first helper app dialog
|
||||
// then before it loads, we kick off the next one and the next one. Subsequent helper app dialogs
|
||||
// were failing because we were still loading the chrome files for the first attempt (error about the xul cache
|
||||
|
@ -1271,7 +1271,7 @@ function createAttachmentDisplayName(aAttachment)
|
|||
|
||||
function displayAttachmentsForExpandedView()
|
||||
{
|
||||
var numAttachments = currentAttachments.length;
|
||||
var numAttachments = currentAttachments.length;
|
||||
var expandedAttachmentBox = document.getElementById('attachmentView');
|
||||
var attachmentSplitter = document.getElementById('attachment-splitter');
|
||||
|
||||
|
@ -1287,7 +1287,7 @@ function displayAttachmentsForExpandedView()
|
|||
// the attachment view and we end up with a box that is too tall.
|
||||
expandedAttachmentBox.collapsed = false;
|
||||
attachmentSplitter.collapsed = false;
|
||||
|
||||
|
||||
if (gShowLargeAttachmentView)
|
||||
expandedAttachmentBox.setAttribute("largeView", "true");
|
||||
|
||||
|
@ -1302,15 +1302,15 @@ function displayAttachmentsForExpandedView()
|
|||
// Create a new attachment widget
|
||||
var displayName = createAttachmentDisplayName(attachment);
|
||||
var attachmentView = attachmentList.appendItem(displayName);
|
||||
|
||||
attachmentView.setAttribute("class", "descriptionitem-iconic");
|
||||
|
||||
attachmentView.setAttribute("class", "descriptionitem-iconic");
|
||||
|
||||
if (gShowLargeAttachmentView)
|
||||
attachmentView.setAttribute("largeView", "true");
|
||||
|
||||
setApplicationIconForAttachment(attachment, attachmentView, gShowLargeAttachmentView);
|
||||
attachmentView.setAttribute("tooltiptext", attachment.displayName);
|
||||
attachmentView.setAttribute("context", "attachmentListContext");
|
||||
attachmentView.setAttribute("context", "attachmentListContext");
|
||||
|
||||
attachmentView.attachment = cloneAttachment(attachment);
|
||||
attachmentView.setAttribute("attachmentUrl", attachment.url);
|
||||
|
@ -1352,7 +1352,7 @@ function FillAttachmentListPopup(popup)
|
|||
{
|
||||
// the FE sometimes call this routine TWICE...I haven't been able to figure out why yet...
|
||||
// protect against it...
|
||||
if (!gBuildAttachmentPopupForCurrentMsg) return;
|
||||
if (!gBuildAttachmentPopupForCurrentMsg) return;
|
||||
|
||||
var attachmentIndex = 0;
|
||||
|
||||
|
@ -1383,13 +1383,13 @@ function FillAttachmentListPopup(popup)
|
|||
}
|
||||
|
||||
// Public method used to clear the file attachment menu
|
||||
function ClearAttachmentMenu(popup)
|
||||
{
|
||||
if ( popup )
|
||||
{
|
||||
function ClearAttachmentMenu(popup)
|
||||
{
|
||||
if ( popup )
|
||||
{
|
||||
while ( popup.childNodes[0].localName == 'menu' )
|
||||
popup.removeChild(popup.childNodes[0]);
|
||||
}
|
||||
popup.removeChild(popup.childNodes[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// Public method used to determine the number of attachments for the currently displayed message...
|
||||
|
@ -1399,20 +1399,20 @@ function GetNumberOfAttachmentsForDisplayedMessage()
|
|||
}
|
||||
|
||||
// private method used to build up a menu list of attachments
|
||||
function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
||||
{
|
||||
function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
||||
{
|
||||
if (popup)
|
||||
{
|
||||
{
|
||||
var item = document.createElement('menu');
|
||||
if ( item )
|
||||
{
|
||||
if ( item )
|
||||
{
|
||||
if (!gMessengerBundle)
|
||||
gMessengerBundle = document.getElementById("bundle_messenger");
|
||||
|
||||
// insert the item just before the separator...the separator is the 2nd to last element in the popup.
|
||||
item.setAttribute('class', 'menu-iconic');
|
||||
setApplicationIconForAttachment(attachment,item, false);
|
||||
|
||||
|
||||
var numItemsInPopup = popup.childNodes.length;
|
||||
// find the separator
|
||||
var indexOfSeparator = 0;
|
||||
|
@ -1424,10 +1424,10 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
|||
[attachmentIndex, displayName]);
|
||||
|
||||
item.setAttribute("crop", "center");
|
||||
item.setAttribute('label', formattedDisplayNameString);
|
||||
item.setAttribute('label', formattedDisplayNameString);
|
||||
item.setAttribute('accesskey', attachmentIndex);
|
||||
|
||||
// each attachment in the list gets its own menupopup with options for saving, deleting, detaching, etc.
|
||||
// each attachment in the list gets its own menupopup with options for saving, deleting, detaching, etc.
|
||||
var openpopup = document.createElement('menupopup');
|
||||
openpopup = item.appendChild(openpopup);
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
|||
|
||||
var menuitementry = document.createElement('menuitem');
|
||||
menuitementry.attachment = cloneAttachment(attachment);
|
||||
menuitementry.setAttribute('oncommand', 'openAttachment(this.attachment)');
|
||||
menuitementry.setAttribute('oncommand', 'openAttachment(this.attachment)');
|
||||
|
||||
if (!gSaveLabel)
|
||||
gSaveLabel = gMessengerBundle.getString("saveLabel");
|
||||
|
@ -1465,28 +1465,28 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
|||
if ("content-type" in currentHeaderData)
|
||||
{
|
||||
var contentType = currentHeaderData["content-type"].headerValue;
|
||||
signedOrEncrypted = contentType.indexOf("application/x-pkcs7-mime") >= 0 ||
|
||||
signedOrEncrypted = contentType.indexOf("application/x-pkcs7-mime") >= 0 ||
|
||||
contentType.indexOf("application/x-pkcs7-signature") >= 0;
|
||||
}
|
||||
var canDetach = !(/news-message:/.test(attachment.uri)) &&
|
||||
var canDetach = !(/news-message:/.test(attachment.uri)) &&
|
||||
!signedOrEncrypted &&
|
||||
(!(/imap-message/.test(attachment.uri)) || MailOfflineMgr.isOnline());
|
||||
menuitementry.setAttribute('label', gOpenLabel);
|
||||
menuitementry.setAttribute('accesskey', gOpenLabelAccesskey);
|
||||
menuitementry.setAttribute('label', gOpenLabel);
|
||||
menuitementry.setAttribute('accesskey', gOpenLabelAccesskey);
|
||||
menuitementry = openpopup.appendChild(menuitementry);
|
||||
if (attachment.contentType == 'text/x-moz-deleted')
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
|
||||
var menuseparator = document.createElement('menuseparator');
|
||||
openpopup.appendChild(menuseparator);
|
||||
|
||||
|
||||
menuitementry = document.createElement('menuitem');
|
||||
menuitementry.attachment = cloneAttachment(attachment);
|
||||
menuitementry.setAttribute('oncommand', 'saveAttachment(this.attachment)');
|
||||
menuitementry.setAttribute('label', gSaveLabel);
|
||||
menuitementry.setAttribute('accesskey', gSaveLabelAccesskey);
|
||||
menuitementry.setAttribute('oncommand', 'saveAttachment(this.attachment)');
|
||||
menuitementry.setAttribute('label', gSaveLabel);
|
||||
menuitementry.setAttribute('accesskey', gSaveLabelAccesskey);
|
||||
if (attachment.contentType == 'text/x-moz-deleted')
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry = openpopup.appendChild(menuitementry);
|
||||
|
||||
var menuseparator = document.createElement('menuseparator');
|
||||
|
@ -1494,28 +1494,28 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex)
|
|||
|
||||
menuitementry = document.createElement('menuitem');
|
||||
menuitementry.attachment = cloneAttachment(attachment);
|
||||
menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, true)');
|
||||
menuitementry.setAttribute('label', gDetachLabel);
|
||||
menuitementry.setAttribute('accesskey', gDetachLabelAccesskey);
|
||||
menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, true)');
|
||||
menuitementry.setAttribute('label', gDetachLabel);
|
||||
menuitementry.setAttribute('accesskey', gDetachLabelAccesskey);
|
||||
if (attachment.contentType == 'text/x-moz-deleted' || !canDetach)
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry = openpopup.appendChild(menuitementry);
|
||||
|
||||
menuitementry = document.createElement('menuitem');
|
||||
menuitementry.attachment = cloneAttachment(attachment);
|
||||
menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, false)');
|
||||
menuitementry.setAttribute('label', gDeleteLabel);
|
||||
menuitementry.setAttribute('accesskey', gDeleteLabelAccesskey);
|
||||
menuitementry.setAttribute('oncommand', 'detachAttachment(this.attachment, false)');
|
||||
menuitementry.setAttribute('label', gDeleteLabel);
|
||||
menuitementry.setAttribute('accesskey', gDeleteLabelAccesskey);
|
||||
if (attachment.contentType == 'text/x-moz-deleted' || !canDetach)
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry.setAttribute('disabled', true);
|
||||
menuitementry = openpopup.appendChild(menuitementry);
|
||||
} // if we created a menu item for this attachment...
|
||||
} // if we have a popup
|
||||
}
|
||||
}
|
||||
|
||||
function HandleAllAttachments(action)
|
||||
{
|
||||
try
|
||||
try
|
||||
{
|
||||
// convert our attachment data into some c++ friendly structs
|
||||
var attachmentContentTypeArray = new Array();
|
||||
|
@ -1563,8 +1563,8 @@ function HandleAllAttachments(action)
|
|||
}
|
||||
}
|
||||
|
||||
function ClearAttachmentList()
|
||||
{
|
||||
function ClearAttachmentList()
|
||||
{
|
||||
// we also have to disable the File/Attachments menuitem
|
||||
var node = document.getElementById("fileAttachmentMenu");
|
||||
if (node)
|
||||
|
@ -1573,11 +1573,11 @@ function ClearAttachmentList()
|
|||
// clear selection
|
||||
var list = document.getElementById('attachmentList');
|
||||
|
||||
while (list.hasChildNodes())
|
||||
while (list.hasChildNodes())
|
||||
list.removeChild(list.lastChild);
|
||||
}
|
||||
|
||||
function ShowEditMessageButton()
|
||||
function ShowEditMessageButton()
|
||||
{
|
||||
// it would be nice if we passed in the msgHdr from the back end
|
||||
var msgHdr;
|
||||
|
@ -1592,10 +1592,10 @@ function ShowEditMessageButton()
|
|||
|
||||
if (IsSpecialFolder(msgHdr.folder, MSG_FOLDER_FLAG_DRAFTS, true))
|
||||
document.getElementById("editMessageBox").collapsed = false;
|
||||
}
|
||||
}
|
||||
|
||||
function ClearEditMessageButton()
|
||||
{
|
||||
function ClearEditMessageButton()
|
||||
{
|
||||
var editBox = document.getElementById("editMessageBox");
|
||||
if (editBox)
|
||||
editBox.collapsed = true;
|
||||
|
@ -1633,9 +1633,9 @@ var attachmentAreaDNDObserver = {
|
|||
aAttachmentData.data.addDataForFlavour("text/x-moz-url", tmpurlWithExtraInfo + "\n" + attachmentDisplayName);
|
||||
aAttachmentData.data.addDataForFlavour("text/x-moz-url-data", tmpurl);
|
||||
aAttachmentData.data.addDataForFlavour("text/x-moz-url-desc", attachmentDisplayName);
|
||||
|
||||
aAttachmentData.data.addDataForFlavour("application/x-moz-file-promise-url", tmpurl);
|
||||
aAttachmentData.data.addDataForFlavour("application/x-moz-file-promise", new nsFlavorDataProvider(), 0, Components.interfaces.nsISupports);
|
||||
|
||||
aAttachmentData.data.addDataForFlavour("application/x-moz-file-promise-url", tmpurl);
|
||||
aAttachmentData.data.addDataForFlavour("application/x-moz-file-promise", new nsFlavorDataProvider(), 0, Components.interfaces.nsISupports);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1654,7 +1654,7 @@ nsFlavorDataProvider.prototype =
|
|||
return this;
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
},
|
||||
|
||||
|
||||
getFlavorData : function(aTransferable, aFlavor, aData, aDataLen)
|
||||
{
|
||||
// get the url for the attachment
|
||||
|
|
|
@ -58,7 +58,7 @@ const kNumFolderViews = 4; // total number of folder views
|
|||
// from nsMsgFolderFlags.h
|
||||
const MSG_FOLDER_FLAG_ELIDED = 0x10;
|
||||
|
||||
var gFolderTree;
|
||||
var gFolderTree;
|
||||
var gMessagePane;
|
||||
var gThreadTree;
|
||||
var gSearchInput;
|
||||
|
@ -107,7 +107,7 @@ function SelectAndScrollToKey(aMsgKey)
|
|||
// select the desired message
|
||||
// if the key isn't found, we won't select anything
|
||||
gDBView.selectMsgByKey(aMsgKey);
|
||||
|
||||
|
||||
// is there a selection?
|
||||
// if not, bail out.
|
||||
var indicies = GetSelectedIndices(gDBView);
|
||||
|
@ -127,7 +127,7 @@ function ScrollToMessageAfterFolderLoad (folder)
|
|||
{
|
||||
var scrolled = pref.getBoolPref("mailnews.scroll_to_new_message") &&
|
||||
ScrollToMessage(nsMsgNavigationType.firstNew, true, false /* selectMessage */);
|
||||
if (!scrolled && folder && pref.getBoolPref("mailnews.remember_selected_message"))
|
||||
if (!scrolled && folder && pref.getBoolPref("mailnews.remember_selected_message"))
|
||||
{
|
||||
// if we failed to scroll to a new message,
|
||||
// reselect the last selected message
|
||||
|
@ -135,31 +135,31 @@ function ScrollToMessageAfterFolderLoad (folder)
|
|||
if (lastMessageLoaded != nsMsgKey_None)
|
||||
scrolled = SelectAndScrollToKey(lastMessageLoaded);
|
||||
}
|
||||
|
||||
if (!scrolled)
|
||||
|
||||
if (!scrolled)
|
||||
{
|
||||
// if we still haven't scrolled,
|
||||
// scroll to the newest, which might be the top or the bottom
|
||||
// depending on our sort order and sort type
|
||||
if (gDBView.sortOrder == nsMsgViewSortOrder.ascending)
|
||||
if (gDBView.sortOrder == nsMsgViewSortOrder.ascending)
|
||||
{
|
||||
switch (gDBView.sortType)
|
||||
switch (gDBView.sortType)
|
||||
{
|
||||
case nsMsgViewSortType.byDate:
|
||||
case nsMsgViewSortType.byReceived:
|
||||
case nsMsgViewSortType.byId:
|
||||
case nsMsgViewSortType.byThread:
|
||||
case nsMsgViewSortType.byDate:
|
||||
case nsMsgViewSortType.byReceived:
|
||||
case nsMsgViewSortType.byId:
|
||||
case nsMsgViewSortType.byThread:
|
||||
scrolled = ScrollToMessage(nsMsgNavigationType.lastMessage, true, false /* selectMessage */);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if still we haven't scrolled,
|
||||
// scroll to the top.
|
||||
if (!scrolled)
|
||||
EnsureRowInThreadTreeIsVisible(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return scrolled;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ var folderListener = {
|
|||
if(property.toString() == "TotalMessages" || property.toString() == "TotalUnreadMessages") {
|
||||
UpdateStatusMessageCounts(gMsgFolderSelected);
|
||||
UpdateFolderLocationPicker(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -213,9 +213,9 @@ var folderListener = {
|
|||
RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder);
|
||||
|
||||
var db = msgFolder.getMsgDatabase(msgWindow);
|
||||
if (db)
|
||||
if (db)
|
||||
db.resetHdrCacheSize(100);
|
||||
|
||||
|
||||
if (gDBView) {
|
||||
gDBView.suppressCommandUpdating = false;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ var folderListener = {
|
|||
viewDebug("uri == current loading folder uri\n");
|
||||
gCurrentLoadingFolderURI = "";
|
||||
|
||||
scrolled = ScrollToMessageAfterFolderLoad(msgFolder);
|
||||
scrolled = ScrollToMessageAfterFolderLoad(msgFolder);
|
||||
|
||||
SetBusyCursor(window, false);
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ var folderListener = {
|
|||
{
|
||||
Search(gSearchEmailAddress);
|
||||
gSearchEmailAddress = null;
|
||||
}
|
||||
}
|
||||
else if (gVirtualFolderTerms)
|
||||
{
|
||||
gDefaultSearchViewTerms = null;
|
||||
|
@ -285,7 +285,7 @@ var folderListener = {
|
|||
gDefaultSearchViewTerms = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// get the view value from the folder
|
||||
if (msgFolder)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ var folderListener = {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (eventType == "ImapHdrDownloaded") {
|
||||
if (folder) {
|
||||
var imapFolder = folder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder);
|
||||
|
@ -330,7 +330,7 @@ var folderListener = {
|
|||
}
|
||||
else if (eventType == "DeleteOrMoveMsgCompleted") {
|
||||
HandleDeleteOrMoveMsgCompleted(folder);
|
||||
}
|
||||
}
|
||||
else if (eventType == "DeleteOrMoveMsgFailed") {
|
||||
HandleDeleteOrMoveMsgFailed(folder);
|
||||
}
|
||||
|
@ -428,8 +428,8 @@ function HandleDeleteOrMoveMsgFailed(folder)
|
|||
// WARNING
|
||||
// this is a fragile and complicated function.
|
||||
// be careful when hacking on it.
|
||||
// don't forget about things like different imap
|
||||
// delete models, multiple views (from multiple thread panes,
|
||||
// don't forget about things like different imap
|
||||
// delete models, multiple views (from multiple thread panes,
|
||||
// search windows, stand alone message windows)
|
||||
function HandleDeleteOrMoveMsgCompleted(folder)
|
||||
{
|
||||
|
@ -448,7 +448,7 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
|
||||
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView);
|
||||
var treeSelection = treeView.selection;
|
||||
|
||||
|
||||
if (gNextMessageViewIndexAfterDelete == -2) {
|
||||
// a move or delete can cause our selection can change underneath us.
|
||||
// this can happen when the user
|
||||
|
@ -471,12 +471,12 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
var startIndex = {};
|
||||
var endIndex = {};
|
||||
treeSelection.getRangeAt(0, startIndex, endIndex);
|
||||
|
||||
|
||||
// select the selected item, so we'll load it
|
||||
treeSelection.select(startIndex.value);
|
||||
treeSelection.select(startIndex.value);
|
||||
treeView.selectionChanged();
|
||||
|
||||
EnsureRowInThreadTreeIsVisible(startIndex.value);
|
||||
EnsureRowInThreadTreeIsVisible(startIndex.value);
|
||||
|
||||
UpdateMailToolbar("delete from another view, 1 row now selected");
|
||||
}
|
||||
|
@ -488,15 +488,15 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
{
|
||||
var viewSize = treeView.rowCount;
|
||||
if (gNextMessageViewIndexAfterDelete >= viewSize)
|
||||
if (gNextMessageViewIndexAfterDelete >= viewSize)
|
||||
{
|
||||
if (viewSize > 0)
|
||||
gNextMessageViewIndexAfterDelete = viewSize - 1;
|
||||
else
|
||||
{
|
||||
{
|
||||
gNextMessageViewIndexAfterDelete = nsMsgViewIndex_None;
|
||||
|
||||
// there is nothing to select since viewSize is 0
|
||||
|
@ -512,13 +512,13 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
// the selection then add the next message to select. This just generates
|
||||
// an extra round of command updating notifications that we are trying to
|
||||
// optimize away.
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
if (gNextMessageViewIndexAfterDelete != nsMsgViewIndex_None)
|
||||
{
|
||||
// when deleting a message we don't update the commands
|
||||
// when deleting a message we don't update the commands
|
||||
// when the selection goes to 0
|
||||
// (we have a hack in nsMsgDBView which prevents that update)
|
||||
// (we have a hack in nsMsgDBView which prevents that update)
|
||||
// so there is no need to
|
||||
// update commands when we select the next message after the delete;
|
||||
// update commands when we select the next message after the delete;
|
||||
// the commands already
|
||||
// have the right update state...
|
||||
gDBView.suppressCommandUpdating = true;
|
||||
|
@ -528,24 +528,24 @@ function HandleDeleteOrMoveMsgCompleted(folder)
|
|||
// be thrown.
|
||||
if (gNextMessageViewIndexAfterDelete >= 0)
|
||||
treeSelection.select(gNextMessageViewIndexAfterDelete);
|
||||
|
||||
// if gNextMessageViewIndexAfterDelete has the same value
|
||||
|
||||
// if gNextMessageViewIndexAfterDelete has the same value
|
||||
// as the last index we had selected, the tree won't generate a
|
||||
// selectionChanged notification for the tree view. So force a manual
|
||||
// selection changed call.
|
||||
// selection changed call.
|
||||
// (don't worry it's cheap if we end up calling it twice).
|
||||
if (treeView)
|
||||
treeView.selectionChanged();
|
||||
|
||||
EnsureRowInThreadTreeIsVisible(gNextMessageViewIndexAfterDelete);
|
||||
EnsureRowInThreadTreeIsVisible(gNextMessageViewIndexAfterDelete);
|
||||
gDBView.suppressCommandUpdating = false;
|
||||
|
||||
// hook for extra toolbar items
|
||||
// XXX TODO
|
||||
// I think there is a bug in the suppression code above.
|
||||
// what if I have two rows selected, and I hit delete,
|
||||
// what if I have two rows selected, and I hit delete,
|
||||
// and so we load the next row.
|
||||
// what if I have commands that only enable where
|
||||
// what if I have commands that only enable where
|
||||
// exactly one row is selected?
|
||||
UpdateMailToolbar("delete from current view, at least one row selected");
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ function HandleCompactCompleted(folder)
|
|||
viewType = dbFolderInfo.viewType;
|
||||
dbFolderInfo = null;
|
||||
}
|
||||
|
||||
|
||||
RerootFolder(uri, msgFolder, viewType, viewFlags, sortType, sortOrder);
|
||||
LoadCurrentlyDisplayedMessage();
|
||||
}
|
||||
|
@ -654,7 +654,7 @@ var gThreePaneIncomingServerListener = {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if nothing is selected at this point, better go select the default
|
||||
// this could happen if nothing was selected when the server was removed
|
||||
selectedFolders = GetSelectedMsgFolders();
|
||||
|
@ -664,8 +664,8 @@ var gThreePaneIncomingServerListener = {
|
|||
},
|
||||
onServerChanged: function(server) {
|
||||
// if the current selected folder is on the server that changed
|
||||
// and that server is an imap or news server,
|
||||
// we need to update the selection.
|
||||
// and that server is an imap or news server,
|
||||
// we need to update the selection.
|
||||
// on those server types, we'll be reconnecting to the server
|
||||
// and our currently selected folder will need to be reloaded
|
||||
// or worse, be invalid.
|
||||
|
@ -694,7 +694,7 @@ function UpdateMailPaneConfig(aMsgWindowInitialized) {
|
|||
ClearAttachmentList();
|
||||
var messagePaneSplitter = GetThreadAndMessagePaneSplitter();
|
||||
var desiredParent = document.getElementById(desiredId);
|
||||
// See Bug 381992. The ctor for the browser element will fire again when we re-insert the messagePaneBox back into the document.
|
||||
// See Bug 381992. The ctor for the browser element will fire again when we re-insert the messagePaneBox back into the document.
|
||||
// But the dtor doesn't fire when the element is removed from the document. Manually call destroy here to avoid a nasty leak.
|
||||
getMessageBrowser().destroy();
|
||||
desiredParent.appendChild(messagePaneSplitter);
|
||||
|
@ -731,18 +731,18 @@ function OnLoadMessenger()
|
|||
document.loadBindingDocument('chrome://global/content/bindings/textbox.xml');
|
||||
|
||||
// Set a sane starting width/height for all resolutions on new profiles. Do this before the window loads
|
||||
if (!document.documentElement.hasAttribute("width"))
|
||||
if (!document.documentElement.hasAttribute("width"))
|
||||
{
|
||||
var defaultWidth, defaultHeight;
|
||||
if (screen.availHeight <= 600)
|
||||
{
|
||||
if (screen.availHeight <= 600)
|
||||
{
|
||||
document.documentElement.setAttribute("sizemode", "maximized");
|
||||
defaultWidth = 800;
|
||||
defaultHeight = 565;
|
||||
}
|
||||
else // for higher resolution displays, use larger values for height and width
|
||||
{
|
||||
defaultWidth = screen.availWidth <= 1024 ? screen.availWidth * .95 : screen.availWidth * .8;
|
||||
defaultWidth = screen.availWidth <= 1024 ? screen.availWidth * .95 : screen.availWidth * .8;
|
||||
defaultHeight = screen.availHeight * .8;
|
||||
}
|
||||
|
||||
|
@ -766,7 +766,7 @@ function delayedOnLoadMessenger()
|
|||
accountCentralBox = document.getElementById("accountCentralBox");
|
||||
GetMessagePane().collapsed = true;
|
||||
verifyAccounts(null);
|
||||
|
||||
|
||||
InitMsgWindow();
|
||||
messenger.setWindow(window, msgWindow);
|
||||
|
||||
|
@ -779,16 +779,16 @@ function delayedOnLoadMessenger()
|
|||
accountManager.setSpecialFolders();
|
||||
accountManager.loadVirtualFolders();
|
||||
accountManager.addIncomingServerListener(gThreePaneIncomingServerListener);
|
||||
|
||||
|
||||
gPhishingDetector.init();
|
||||
|
||||
|
||||
AddToSession();
|
||||
|
||||
//need to add to session before trying to load start folder otherwise listeners aren't
|
||||
//set up correctly.
|
||||
// argument[0] --> folder uri
|
||||
// argument[1] --> optional message key
|
||||
// argument[2] --> optional email address; //will come from aim; needs to show msgs from buddy's email address
|
||||
// argument[2] --> optional email address; //will come from aim; needs to show msgs from buddy's email address
|
||||
if ("arguments" in window)
|
||||
{
|
||||
// filter our any feed urls that came in as arguments to the new window...
|
||||
|
@ -813,13 +813,13 @@ function delayedOnLoadMessenger()
|
|||
shellService = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
|
||||
defaultAccount = accountManager.defaultAccount;
|
||||
} catch (ex) {}
|
||||
|
||||
// show the default client dialog only if we have at least one account,
|
||||
// if we should check for the default client,
|
||||
|
||||
// show the default client dialog only if we have at least one account,
|
||||
// if we should check for the default client,
|
||||
// and we aren't already the default for mail)
|
||||
if (shellService && defaultAccount && shellService.shouldCheckDefaultClient
|
||||
if (shellService && defaultAccount && shellService.shouldCheckDefaultClient
|
||||
&& !shellService.isDefaultClient(true, nsIShellService.MAIL))
|
||||
window.openDialog("chrome://messenger/content/defaultClientDialog.xul", "DefaultClient",
|
||||
window.openDialog("chrome://messenger/content/defaultClientDialog.xul", "DefaultClient",
|
||||
"modal,centerscreen,chrome,resizable=no");
|
||||
#endif
|
||||
|
||||
|
@ -834,7 +834,7 @@ function delayedOnLoadMessenger()
|
|||
|
||||
//Set focus to the Thread Pane the first time the window is opened.
|
||||
SetFocusThreadPane();
|
||||
|
||||
|
||||
// initialize the customizeDone method on the customizeable toolbar
|
||||
var toolbox = document.getElementById("mail-toolbox");
|
||||
toolbox.customizeDone = MailToolboxCustomizeDone;
|
||||
|
@ -889,8 +889,8 @@ function loadStartFolder(initialUri)
|
|||
|
||||
startFolderResource = rootMsgFolder.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
|
||||
// Enable checknew mail once by turning checkmail pref 'on' to bring
|
||||
// all users to one plane. This allows all users to go to Inbox. User can
|
||||
// Enable checknew mail once by turning checkmail pref 'on' to bring
|
||||
// all users to one plane. This allows all users to go to Inbox. User can
|
||||
// always go to server settings panel and turn off "Check for new mail at startup"
|
||||
if (!pref.getBoolPref(kMailCheckOncePrefName))
|
||||
{
|
||||
|
@ -901,12 +901,12 @@ function loadStartFolder(initialUri)
|
|||
// Get the user pref to see if the login at startup is enabled for default account
|
||||
isLoginAtStartUpEnabled = defaultServer.loginAtStartUp;
|
||||
|
||||
// Get Inbox only if when we have to login
|
||||
if (isLoginAtStartUpEnabled)
|
||||
// Get Inbox only if when we have to login
|
||||
if (isLoginAtStartUpEnabled)
|
||||
{
|
||||
//now find Inbox
|
||||
var outNumFolders = new Object();
|
||||
var inboxFolder = rootMsgFolder.getFoldersWithFlag(0x1000, 1, outNumFolders);
|
||||
var inboxFolder = rootMsgFolder.getFoldersWithFlag(0x1000, 1, outNumFolders);
|
||||
if (!inboxFolder) return;
|
||||
|
||||
startFolderResource = inboxFolder.QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
|
@ -917,7 +917,7 @@ function loadStartFolder(initialUri)
|
|||
|
||||
// it is possible we were given an initial uri and we need to subscribe or try to add
|
||||
// the folder. i.e. the user just clicked on a news folder they aren't subscribed to from a browser
|
||||
// the news url comes in here.
|
||||
// the news url comes in here.
|
||||
|
||||
// Perform biff on the server to check for new mail, except for imap
|
||||
// or a pop3 account that is deferred or deferred to,
|
||||
|
@ -925,7 +925,7 @@ function loadStartFolder(initialUri)
|
|||
if (!initialUri && isLoginAtStartUpEnabled && gLoadStartFolder
|
||||
&& !defaultServer.isDeferredTo && !gNewAccountToLoad &&
|
||||
defaultServer.rootFolder == defaultServer.rootMsgFolder)
|
||||
defaultServer.performBiff(msgWindow);
|
||||
defaultServer.performBiff(msgWindow);
|
||||
|
||||
SelectFolder(startFolder.URI);
|
||||
}
|
||||
|
@ -976,14 +976,14 @@ function InitPanes()
|
|||
|
||||
function InitializeDataSources()
|
||||
{
|
||||
//Setup common mailwindow stuff.
|
||||
AddDataSources();
|
||||
//Setup common mailwindow stuff.
|
||||
AddDataSources();
|
||||
|
||||
//To threadpane move context menu
|
||||
SetupMoveCopyMenus('threadPaneContext-moveMenu', accountManagerDataSource, folderDataSource);
|
||||
//To threadpane move context menu
|
||||
SetupMoveCopyMenus('threadPaneContext-moveMenu', accountManagerDataSource, folderDataSource);
|
||||
|
||||
//To threadpane copy content menu
|
||||
SetupMoveCopyMenus('threadPaneContext-copyMenu', accountManagerDataSource, folderDataSource);
|
||||
//To threadpane copy content menu
|
||||
SetupMoveCopyMenus('threadPaneContext-copyMenu', accountManagerDataSource, folderDataSource);
|
||||
}
|
||||
|
||||
function OnFolderUnreadColAttrModified(event)
|
||||
|
@ -1000,7 +1000,7 @@ function UpdateFolderColumnVisibility()
|
|||
{
|
||||
var folderNameCol = document.getElementById("folderNameCol");
|
||||
var showColumns = pref.getBoolPref("mail.showFolderPaneColumns");
|
||||
var folderUnreadCol = document.getElementById("folderUnreadCol");
|
||||
var folderUnreadCol = document.getElementById("folderUnreadCol");
|
||||
var folderColumnLabel = document.getElementById("folderColumnLabel");
|
||||
if (!showColumns)
|
||||
{
|
||||
|
@ -1025,7 +1025,7 @@ function UpdateFolderColumnVisibility()
|
|||
var folderNameCell = document.getElementById("folderNameCell");
|
||||
folderNameCell.setAttribute("label", "?folderTreeSimpleName");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loadFolderViewForTree -- a helper routine split away from
|
||||
// loadFolderView.
|
||||
|
@ -1036,12 +1036,12 @@ function loadFolderViewForTree(aNewFolderView, aFolderTree)
|
|||
var database = aFolderTree.database;
|
||||
var nsIRDFDataSource = Components.interfaces.nsIRDFDataSource;
|
||||
|
||||
// Each folder pane view has the following properties:
|
||||
// Each folder pane view has the following properties:
|
||||
// ref-> the ref attribute for the folderTree
|
||||
// label -> the UI label associated with the folder view
|
||||
// datasources -> array of the data sources associated with the view
|
||||
|
||||
var folderViews = [
|
||||
var folderViews = [
|
||||
{ref:"msgaccounts:/", label:"folderPaneHeader", dataSources: [accountManagerDataSource.QueryInterface(nsIRDFDataSource),
|
||||
folderDataSource.QueryInterface(nsIRDFDataSource)] },
|
||||
{ref:"mailnewsunreadfolders:/", label:"folderPaneHeader_unread", dataSources: [unreadFolderDataSource.QueryInterface(nsIRDFDataSource)]},
|
||||
|
@ -1074,18 +1074,18 @@ function loadFolderView(aNewFolderView)
|
|||
{
|
||||
if (gCurrentFolderView && (gCurrentFolderView == aNewFolderView))
|
||||
return;
|
||||
|
||||
|
||||
var folderTree = GetFolderTree();
|
||||
|
||||
var folderPaneHeader = document.getElementById('folderpane-title');
|
||||
var folderTree = GetFolderTree();
|
||||
var database = GetFolderDatasource();
|
||||
|
||||
|
||||
// load the folder view into the folder pane
|
||||
folderPaneHeader.value = loadFolderViewForTree(aNewFolderView, GetFolderTree());
|
||||
|
||||
|
||||
// if the folder location picker is visible, load the folder view into the location
|
||||
// picker as well.
|
||||
// picker as well.
|
||||
var folderLocationPicker = document.getElementById('folder-location-container');
|
||||
if (folderLocationPicker)
|
||||
loadFolderViewForTree(aNewFolderView, document.getElementById('folderLocationPopup').tree);
|
||||
|
@ -1136,7 +1136,7 @@ function OnUnloadFolderPane()
|
|||
// in the thread pane. so if a user ran an old build, and then
|
||||
// upgraded, they get the new column, and this causes problems.
|
||||
// We're trying to avoid a similar problem to bug #96979.
|
||||
// to work around this, we hide the column once, using the
|
||||
// to work around this, we hide the column once, using the
|
||||
// "mailnews.ui.threadpane.version" pref.
|
||||
function UpgradeThreadPaneUI()
|
||||
{
|
||||
|
@ -1155,21 +1155,21 @@ function UpgradeThreadPaneUI()
|
|||
var receivedCol = document.getElementById("receivedCol");
|
||||
var junkCol = document.getElementById("junkStatusCol");
|
||||
|
||||
if (threadPaneUIVersion < 5)
|
||||
if (threadPaneUIVersion < 5)
|
||||
{
|
||||
if (threadPaneUIVersion < 4)
|
||||
{
|
||||
if (threadPaneUIVersion < 3)
|
||||
if (threadPaneUIVersion < 3)
|
||||
{
|
||||
|
||||
// in thunderbird, we are inserting the junk column just before the
|
||||
// date column.
|
||||
// in thunderbird, we are inserting the junk column just before the
|
||||
// date column.
|
||||
threadTree._reorderColumn(junkCol, dateCol, true);
|
||||
}
|
||||
|
||||
var senderCol = document.getElementById("senderCol");
|
||||
var recipientCol = document.getElementById("recipientCol");
|
||||
threadTree._reorderColumn(recipientCol, junkCol, true);
|
||||
var recipientCol = document.getElementById("recipientCol");
|
||||
threadTree._reorderColumn(recipientCol, junkCol, true);
|
||||
threadTree._reorderColumn(senderCol, recipientCol, true);
|
||||
|
||||
} // version 4 upgrades
|
||||
|
@ -1177,7 +1177,7 @@ function UpgradeThreadPaneUI()
|
|||
// version 5 adds a new column called attachments
|
||||
var attachmentCol = document.getElementById("attachmentCol");
|
||||
var subjectCol = document.getElementById("subjectCol");
|
||||
|
||||
|
||||
threadTree._reorderColumn(attachmentCol, subjectCol, true);
|
||||
|
||||
} // version 5 upgrades
|
||||
|
@ -1206,9 +1206,9 @@ function OnLoadThreadPane()
|
|||
function folderLocationPickerOnLoad()
|
||||
{
|
||||
var folderLocationPicker = document.getElementById('folder-location-container');
|
||||
if (!folderLocationPicker)
|
||||
if (!folderLocationPicker)
|
||||
return;
|
||||
|
||||
|
||||
var locationTree = document.getElementById('folderLocationPopup').tree;
|
||||
locationTree.database.AddDataSource(accountManagerDataSource);
|
||||
locationTree.database.AddDataSource(folderDataSource);
|
||||
|
@ -1223,16 +1223,16 @@ function OnLocationTreeSelect(menulist)
|
|||
function UpdateFolderLocationPicker(resource)
|
||||
{
|
||||
var folderLocationPicker = document.getElementById('folder-location-container');
|
||||
if (!folderLocationPicker)
|
||||
if (!folderLocationPicker)
|
||||
return;
|
||||
|
||||
|
||||
var tree = GetFolderTree();
|
||||
var folders = document.getElementById('locationFolders');
|
||||
var properties = ['BiffState', 'NewMessages', 'HasUnreadMessages',
|
||||
'SpecialFolder', 'IsServer', 'IsSecure', 'ServerType', 'NoSelect'];
|
||||
var label = GetFolderAttribute(tree, resource, 'FolderTreeName');
|
||||
folders.setAttribute("label", label);
|
||||
for (var i in properties)
|
||||
for (var i in properties)
|
||||
{
|
||||
var property = properties[i];
|
||||
var value = GetFolderAttribute(tree, resource, property);
|
||||
|
@ -1264,7 +1264,7 @@ function GetSearchInput()
|
|||
|
||||
function GetMessagePane()
|
||||
{
|
||||
if (!gMessagePane)
|
||||
if (!gMessagePane)
|
||||
gMessagePane = document.getElementById("messagepanebox");
|
||||
return gMessagePane;
|
||||
}
|
||||
|
@ -1276,41 +1276,41 @@ function GetMessagePaneFrame()
|
|||
|
||||
function FindInSidebar(currentWindow, id)
|
||||
{
|
||||
var item = currentWindow.document.getElementById(id);
|
||||
if(item)
|
||||
return item;
|
||||
var item = currentWindow.document.getElementById(id);
|
||||
if(item)
|
||||
return item;
|
||||
|
||||
for(var i = 0; i < currentWindow.frames.length; i++)
|
||||
{
|
||||
var frameItem = FindInSidebar(currentWindow.frames[i], id);
|
||||
if(frameItem)
|
||||
return frameItem;
|
||||
}
|
||||
for(var i = 0; i < currentWindow.frames.length; i++)
|
||||
{
|
||||
var frameItem = FindInSidebar(currentWindow.frames[i], id);
|
||||
if(frameItem)
|
||||
return frameItem;
|
||||
}
|
||||
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
function GetThreadAndMessagePaneSplitter()
|
||||
{
|
||||
if(gThreadAndMessagePaneSplitter) return gThreadAndMessagePaneSplitter;
|
||||
var splitter = document.getElementById('threadpane-splitter');
|
||||
gThreadAndMessagePaneSplitter = splitter;
|
||||
return splitter;
|
||||
if(gThreadAndMessagePaneSplitter) return gThreadAndMessagePaneSplitter;
|
||||
var splitter = document.getElementById('threadpane-splitter');
|
||||
gThreadAndMessagePaneSplitter = splitter;
|
||||
return splitter;
|
||||
}
|
||||
|
||||
function GetUnreadCountElement()
|
||||
{
|
||||
if(gUnreadCount) return gUnreadCount;
|
||||
var unreadCount = document.getElementById('unreadMessageCount');
|
||||
gUnreadCount = unreadCount;
|
||||
return unreadCount;
|
||||
if(gUnreadCount) return gUnreadCount;
|
||||
var unreadCount = document.getElementById('unreadMessageCount');
|
||||
gUnreadCount = unreadCount;
|
||||
return unreadCount;
|
||||
}
|
||||
function GetTotalCountElement()
|
||||
{
|
||||
if(gTotalCount) return gTotalCount;
|
||||
var totalCount = document.getElementById('totalMessageCount');
|
||||
gTotalCount = totalCount;
|
||||
return totalCount;
|
||||
if(gTotalCount) return gTotalCount;
|
||||
var totalCount = document.getElementById('totalMessageCount');
|
||||
gTotalCount = totalCount;
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
function IsMessagePaneCollapsed()
|
||||
|
@ -1334,8 +1334,8 @@ function ClearThreadPaneSelection()
|
|||
if (gDBView) {
|
||||
var treeView = gDBView.QueryInterface(Components.interfaces.nsITreeView);
|
||||
var treeSelection = treeView.selection;
|
||||
if (treeSelection)
|
||||
treeSelection.clearSelection();
|
||||
if (treeSelection)
|
||||
treeSelection.clearSelection();
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
|
@ -1440,7 +1440,7 @@ function FolderPaneDoubleClick(folderIndex, event)
|
|||
if (!pref.getBoolPref("mailnews.reuse_thread_window2"))
|
||||
{
|
||||
var folderResource = GetFolderResource(GetFolderTree(), folderIndex);
|
||||
// Open a new msg window only if we are double clicking on
|
||||
// Open a new msg window only if we are double clicking on
|
||||
// folders or newsgroups.
|
||||
MsgOpenNewWindowForFolder(folderResource.Value, -1 /* key */);
|
||||
|
||||
|
@ -1496,7 +1496,7 @@ function GetSelectedMsgFolders()
|
|||
folderTree.view.selection.getRangeAt(i, startIndex, endIndex);
|
||||
for (var j = startIndex.value; j <= endIndex.value; j++)
|
||||
{
|
||||
var folderResource = GetFolderResource(folderTree, j);
|
||||
var folderResource = GetFolderResource(folderTree, j);
|
||||
if (folderResource.Value != "http://home.netscape.com/NC-rdf#PageTitleFakeAccount") {
|
||||
var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
if(msgFolder)
|
||||
|
@ -1521,7 +1521,7 @@ function GetFirstSelectedMessage()
|
|||
function GetSelectedIndices(dbView)
|
||||
{
|
||||
try {
|
||||
var indicesArray = {};
|
||||
var indicesArray = {};
|
||||
var length = {};
|
||||
dbView.getIndicesForSelection(indicesArray,length);
|
||||
return indicesArray.value;
|
||||
|
@ -1535,13 +1535,13 @@ function GetSelectedIndices(dbView)
|
|||
function GetSelectedMessages()
|
||||
{
|
||||
try {
|
||||
var messageArray = {};
|
||||
var messageArray = {};
|
||||
var length = {};
|
||||
var view = GetDBView();
|
||||
view.getURIsForSelection(messageArray,length);
|
||||
if (length.value)
|
||||
return messageArray.value;
|
||||
else
|
||||
else
|
||||
return null;
|
||||
}
|
||||
catch (ex) {
|
||||
|
@ -1574,10 +1574,10 @@ function ClearMessageSelection()
|
|||
|
||||
function GetCompositeDataSource(command)
|
||||
{
|
||||
if (command == "GetNewMessages" || command == "NewFolder" || command == "MarkAllMessagesRead")
|
||||
if (command == "GetNewMessages" || command == "NewFolder" || command == "MarkAllMessagesRead")
|
||||
return GetFolderDatasource();
|
||||
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Figures out how many messages are selected (hilighted - does not necessarily
|
||||
|
@ -1697,7 +1697,7 @@ function LoadNavigatedToMessage(msgHdr, folder, folderUri)
|
|||
gStartMsgKey = msgHdr.messageKey;
|
||||
SelectFolder(folderUri);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Some of the per account junk mail settings have been
|
||||
|
@ -1708,7 +1708,7 @@ function MigrateJunkMailSettings()
|
|||
var junkMailSettingsVersion = pref.getIntPref("mail.spam.version");
|
||||
if (!junkMailSettingsVersion)
|
||||
{
|
||||
// get the default account, check to see if we have values for our
|
||||
// get the default account, check to see if we have values for our
|
||||
// globally migrated prefs.
|
||||
var defaultAccount;
|
||||
try {
|
||||
|
@ -1726,7 +1726,7 @@ function MigrateJunkMailSettings()
|
|||
pref.setBoolPref("mail.spam.logging.enabled", pref.getBoolPref(prefix + "spamLoggingEnabled"));
|
||||
if (pref.prefHasUserValue(prefix + "markAsReadOnSpam"))
|
||||
pref.setBoolPref("mail.spam.markAsReadOnSpam", pref.getBoolPref(prefix + "markAsReadOnSpam"));
|
||||
}
|
||||
}
|
||||
// bump the version so we don't bother doing this again.
|
||||
pref.setIntPref("mail.spam.version", 1);
|
||||
}
|
||||
|
@ -1756,8 +1756,8 @@ function MigrateFolderViews()
|
|||
}
|
||||
}
|
||||
|
||||
// Thunderbird has been storing old attachment download meta data in downloads.rdf
|
||||
// even though there was no way to show or clean up this data. Now that we are using
|
||||
// Thunderbird has been storing old attachment download meta data in downloads.rdf
|
||||
// even though there was no way to show or clean up this data. Now that we are using
|
||||
// the new download manager in toolkit, we don't want to present this old data.
|
||||
// To migrate to the new download manager, remove downloads.rdf.
|
||||
function MigrateAttachmentDownloadStore()
|
||||
|
@ -1770,9 +1770,9 @@ function MigrateAttachmentDownloadStore()
|
|||
var downloadsFile = dirService.get("DLoads", Components.interfaces.nsIFile);
|
||||
if (downloadsFile && downloadsFile.exists())
|
||||
downloadsFile.remove(false);
|
||||
|
||||
|
||||
// bump the version so we don't bother doing this again.
|
||||
pref.setIntPref("mail.attachment.store.version", 1);
|
||||
pref.setIntPref("mail.attachment.store.version", 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/msgSynchronize.dtd" >
|
||||
|
||||
<dialog xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
<dialog xmlns:nc="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="select-offline"
|
||||
id="select-offline"
|
||||
title="&MsgSelect.label;"
|
||||
width="450" height="400"
|
||||
persist="width height"
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
||||
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/commandglue.js"/>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<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/msgSynchronize.js"/>
|
||||
|
||||
|
||||
<description class="desc">&MsgSelectDesc.label;</description>
|
||||
|
||||
<tree id="synchronizeTree" flex="1" hidecolumnpicker="true"
|
||||
|
@ -100,7 +100,7 @@
|
|||
predicate="http://home.netscape.com/NC-rdf#Synchronize"
|
||||
object="?synchronize"/>
|
||||
</bindings>
|
||||
|
||||
|
||||
<action>
|
||||
<treechildren>
|
||||
<treeitem uri="?member">
|
||||
|
@ -116,7 +116,7 @@
|
|||
</template>
|
||||
<treecols>
|
||||
<treecol id="folderNameCol" flex="5" persist="hidden width" label="&MsgSelectItems.label;" primary="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="syncCol" flex="1" persist="hidden width" label="&MsgSelectInd.label;" cycler="true"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
var gSubscribeTree = null;
|
||||
var gSearchTree;
|
||||
var okCallback = null;
|
||||
|
@ -109,23 +109,23 @@ function onServerClick(event)
|
|||
|
||||
function SetUpServerMenu()
|
||||
{
|
||||
//dump("SetUpServerMenu()\n");
|
||||
//dump("SetUpServerMenu()\n");
|
||||
|
||||
var serverMenu = document.getElementById("serverMenu");
|
||||
var menuitems = serverMenu.getElementsByAttribute("id", gServerURI);
|
||||
|
||||
try {
|
||||
//dump("gServerURI="+gServerURI+"\n");
|
||||
//dump("menuitems="+menuitems+"\n");
|
||||
//dump("menuitems[0]="+menuitems[0]+"\n");
|
||||
//dump("serverMenu="+serverMenu+"\n");
|
||||
serverMenu.selectedItem = menuitems[0];
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("failed to set the selected server: " + ex + "\n");
|
||||
}
|
||||
try {
|
||||
//dump("gServerURI="+gServerURI+"\n");
|
||||
//dump("menuitems="+menuitems+"\n");
|
||||
//dump("menuitems[0]="+menuitems[0]+"\n");
|
||||
//dump("serverMenu="+serverMenu+"\n");
|
||||
serverMenu.selectedItem = menuitems[0];
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("failed to set the selected server: " + ex + "\n");
|
||||
}
|
||||
|
||||
SetServerTypeSpecificTextValues();
|
||||
SetServerTypeSpecificTextValues();
|
||||
}
|
||||
|
||||
var MySubscribeListener = {
|
||||
|
@ -145,7 +145,7 @@ var MySubscribeListener = {
|
|||
document.getElementById("refreshButton").disabled = false;
|
||||
document.getElementById("currentListTab").disabled = false;
|
||||
document.getElementById("newGroupsTab").disabled = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function SetUpTree(forceToServer, getOnlyNew)
|
||||
|
@ -156,7 +156,7 @@ function SetUpTree(forceToServer, getOnlyNew)
|
|||
|
||||
var server = GetMsgFolderFromUri(gServerURI, true).server;
|
||||
try
|
||||
{
|
||||
{
|
||||
CleanUpSearchView();
|
||||
gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer);
|
||||
gSubscribeTree.setAttribute('ref',null);
|
||||
|
@ -186,7 +186,7 @@ function SetUpTree(forceToServer, getOnlyNew)
|
|||
|
||||
gSubscribableServer.startPopulating(msgWindow, forceToServer, getOnlyNew);
|
||||
}
|
||||
catch (ex)
|
||||
catch (ex)
|
||||
{
|
||||
dump("failed to populate subscribe ds: " + ex + "\n");
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ function SubscribeOnLoad()
|
|||
//dump("SubscribeOnLoad()\n");
|
||||
gSubscribeBundle = document.getElementById("bundle_subscribe");
|
||||
gMessengerBundle = document.getElementById("bundle_messenger");
|
||||
|
||||
|
||||
gSubscribeTree = document.getElementById("subscribeTree");
|
||||
gSearchTree = document.getElementById("searchTree");
|
||||
gSearchTreeBoxObject = document.getElementById("searchTree").treeBoxObject;
|
||||
|
@ -231,57 +231,57 @@ function SubscribeOnLoad()
|
|||
gSubscribeDeck = document.getElementById("subscribedeck");
|
||||
|
||||
msgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);
|
||||
msgWindow.domWindow = window;
|
||||
msgWindow.domWindow = window;
|
||||
msgWindow.statusFeedback = gStatusFeedback;
|
||||
msgWindow.rootDocShell.allowAuth = true;
|
||||
msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
|
||||
|
||||
// look in arguments[0] for parameters
|
||||
if (window.arguments && window.arguments[0]) {
|
||||
if ( window.arguments[0].okCallback ) {
|
||||
top.okCallback = window.arguments[0].okCallback;
|
||||
}
|
||||
}
|
||||
|
||||
gServerURI = null;
|
||||
if (window.arguments[0].preselectedURI) {
|
||||
var uri = window.arguments[0].preselectedURI;
|
||||
//dump("subscribe: got a uri," + uri + "\n");
|
||||
var folder = GetMsgFolderFromUri(uri, true);
|
||||
//dump("folder="+folder+"\n");
|
||||
//dump("folder.server="+folder.server+"\n");
|
||||
try {
|
||||
// look in arguments[0] for parameters
|
||||
if (window.arguments && window.arguments[0]) {
|
||||
if ( window.arguments[0].okCallback ) {
|
||||
top.okCallback = window.arguments[0].okCallback;
|
||||
}
|
||||
}
|
||||
|
||||
gServerURI = null;
|
||||
if (window.arguments[0].preselectedURI) {
|
||||
var uri = window.arguments[0].preselectedURI;
|
||||
//dump("subscribe: got a uri," + uri + "\n");
|
||||
var folder = GetMsgFolderFromUri(uri, true);
|
||||
//dump("folder="+folder+"\n");
|
||||
//dump("folder.server="+folder.server+"\n");
|
||||
try {
|
||||
CleanUpSearchView();
|
||||
gSubscribableServer = folder.server.QueryInterface(Components.interfaces.nsISubscribableServer);
|
||||
gSubscribableServer = folder.server.QueryInterface(Components.interfaces.nsISubscribableServer);
|
||||
// enable (or disable) the search related UI
|
||||
EnableSearchUI();
|
||||
gServerURI = folder.server.serverURI;
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("not a subscribable server\n");
|
||||
gServerURI = folder.server.serverURI;
|
||||
}
|
||||
catch (ex) {
|
||||
//dump("not a subscribable server\n");
|
||||
CleanUpSearchView();
|
||||
gSubscribableServer = null;
|
||||
gServerURI = null;
|
||||
}
|
||||
}
|
||||
gSubscribableServer = null;
|
||||
gServerURI = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!gServerURI) {
|
||||
//dump("subscribe: no uri\n");
|
||||
//dump("xxx todo: use the default news server. right now, I'm just using the first server\n");
|
||||
var serverMenu = document.getElementById("serverMenu");
|
||||
var menuitems = serverMenu.getElementsByTagName("menuitem");
|
||||
|
||||
if (menuitems.length > 1) {
|
||||
gServerURI = menuitems[1].id;
|
||||
}
|
||||
else {
|
||||
//dump("xxx todo none of your servers are subscribable\n");
|
||||
//dump("xxx todo fix this by disabling subscribe if no subscribable server or, add a CREATE SERVER button, like in 4.x\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!gServerURI) {
|
||||
//dump("subscribe: no uri\n");
|
||||
//dump("xxx todo: use the default news server. right now, I'm just using the first server\n");
|
||||
var serverMenu = document.getElementById("serverMenu");
|
||||
var menuitems = serverMenu.getElementsByTagName("menuitem");
|
||||
|
||||
SetUpServerMenu();
|
||||
if (menuitems.length > 1) {
|
||||
gServerURI = menuitems[1].id;
|
||||
}
|
||||
else {
|
||||
//dump("xxx todo none of your servers are subscribable\n");
|
||||
//dump("xxx todo fix this by disabling subscribe if no subscribable server or, add a CREATE SERVER button, like in 4.x\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SetUpServerMenu();
|
||||
|
||||
ShowCurrentList();
|
||||
|
||||
|
@ -290,15 +290,15 @@ function SubscribeOnLoad()
|
|||
|
||||
function subscribeOK()
|
||||
{
|
||||
//dump("in subscribeOK()\n")
|
||||
if (top.okCallback) {
|
||||
top.okCallback(top.gChangeTable);
|
||||
}
|
||||
Stop();
|
||||
if (gSubscribableServer) {
|
||||
gSubscribableServer.subscribeCleanup();
|
||||
}
|
||||
return true;
|
||||
//dump("in subscribeOK()\n")
|
||||
if (top.okCallback) {
|
||||
top.okCallback(top.gChangeTable);
|
||||
}
|
||||
Stop();
|
||||
if (gSubscribableServer) {
|
||||
gSubscribableServer.subscribeCleanup();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function subscribeCancel()
|
||||
|
@ -317,7 +317,7 @@ function SetState(name,state)
|
|||
StateChanged(name,state);
|
||||
}
|
||||
|
||||
function changeTableRecord(server, name, state)
|
||||
function changeTableRecord(server, name, state)
|
||||
{
|
||||
this.server = server;
|
||||
this.name = name;
|
||||
|
@ -360,7 +360,7 @@ function SearchOnClick(event)
|
|||
|
||||
if (col.value.id == "subscribedColumn2") {
|
||||
if (event.detail != 2) {
|
||||
// single clicked on the check box
|
||||
// single clicked on the check box
|
||||
// (in the "subscribedColumn2" column) reverse state
|
||||
// if double click, do nothing
|
||||
ReverseStateFromRow(row.value);
|
||||
|
@ -399,12 +399,12 @@ function SetStateFromRow(row, state)
|
|||
function SetSubscribeState(state)
|
||||
{
|
||||
try {
|
||||
// we need to iterate over the tree selection, and set the state for
|
||||
// we need to iterate over the tree selection, and set the state for
|
||||
// all rows in the selection
|
||||
var inSearchMode = InSearchMode();
|
||||
var view = inSearchMode ? gSearchView : gSubscribeTree.view;
|
||||
var colId = inSearchMode ? "nameColumn2" : "nameColumn";
|
||||
|
||||
|
||||
var sel = view.selection;
|
||||
for (var i = 0; i < sel.getRangeCount(); ++i) {
|
||||
var start = {}, end = {};
|
||||
|
@ -419,7 +419,7 @@ function SetSubscribeState(state)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (inSearchMode) {
|
||||
// force a repaint
|
||||
InvalidateSearchTree();
|
||||
|
@ -451,7 +451,7 @@ function SubscribeOnClick(event)
|
|||
// we only care about button 0 (left click) events
|
||||
if (event.button != 0 || event.originalTarget.localName != "treechildren")
|
||||
return;
|
||||
|
||||
|
||||
var row = {}, col = {}, obj = {};
|
||||
gSubscribeTree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, obj);
|
||||
if (row.value == -1 || row.value > (gSubscribeTree.view.rowCount - 1))
|
||||
|
@ -463,7 +463,7 @@ function SubscribeOnClick(event)
|
|||
if (!gSubscribeTree.view.isContainer(row.value)) {
|
||||
ReverseStateFromNode(row.value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event.detail == 1)
|
||||
{
|
||||
|
@ -572,7 +572,7 @@ function onSearchTreeKeyPress(event)
|
|||
if (event.charCode != KeyEvent.DOM_VK_SPACE)
|
||||
return;
|
||||
|
||||
var treeSelection = gSearchView.selection;
|
||||
var treeSelection = gSearchView.selection;
|
||||
for (var i=0;i<treeSelection.getRangeCount();i++) {
|
||||
var start = {}, end = {};
|
||||
treeSelection.getRangeAt(i,start,end);
|
||||
|
@ -590,7 +590,7 @@ function onSubscribeTreeKeyPress(event)
|
|||
if (event.charCode != KeyEvent.DOM_VK_SPACE)
|
||||
return;
|
||||
|
||||
var treeSelection = gSubscribeTree.view.selection;
|
||||
var treeSelection = gSubscribeTree.view.selection;
|
||||
for (var i=0;i<treeSelection.getRangeCount();i++) {
|
||||
var start = {}, end = {};
|
||||
treeSelection.getRangeAt(i,start,end);
|
||||
|
@ -600,7 +600,7 @@ function onSubscribeTreeKeyPress(event)
|
|||
}
|
||||
|
||||
|
||||
function doHelpButton()
|
||||
function doHelpButton()
|
||||
{
|
||||
openHelp("mail-subscribe");
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* widget/menu item, which gets some context (like the current selection)
|
||||
* and then calls a function/command in commandglue
|
||||
*/
|
||||
|
||||
|
||||
//The eventual goal is for this file to go away and its contents to be brought into
|
||||
//mailWindowOverlay.js. This is currently being done.
|
||||
|
||||
|
@ -76,20 +76,20 @@ function GetSelectedFolderURI()
|
|||
return null;
|
||||
}
|
||||
|
||||
function MsgRenameFolder()
|
||||
function MsgRenameFolder()
|
||||
{
|
||||
var preselectedURI = GetSelectedFolderURI();
|
||||
var folderTree = GetFolderTree();
|
||||
var preselectedURI = GetSelectedFolderURI();
|
||||
var folderTree = GetFolderTree();
|
||||
|
||||
var name = GetFolderNameFromUri(preselectedURI, folderTree);
|
||||
var name = GetFolderNameFromUri(preselectedURI, folderTree);
|
||||
|
||||
dump("preselectedURI = " + preselectedURI + "\n");
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/renameFolderDialog.xul",
|
||||
"newFolder",
|
||||
"chrome,titlebar,modal",
|
||||
{preselectedURI: preselectedURI,
|
||||
okCallback: RenameFolder, name: name});
|
||||
dump("preselectedURI = " + preselectedURI + "\n");
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/renameFolderDialog.xul",
|
||||
"newFolder",
|
||||
"chrome,titlebar,modal",
|
||||
{preselectedURI: preselectedURI,
|
||||
okCallback: RenameFolder, name: name});
|
||||
}
|
||||
|
||||
function RenameFolder(name,uri)
|
||||
|
@ -98,7 +98,7 @@ function RenameFolder(name,uri)
|
|||
var folderTree = GetFolderTree();
|
||||
if (folderTree)
|
||||
{
|
||||
if (uri && (uri != "") && name && (name != ""))
|
||||
if (uri && (uri != "") && name && (name != ""))
|
||||
{
|
||||
var selectedFolder = GetResourceFromUri(uri);
|
||||
if (gDBView)
|
||||
|
@ -119,18 +119,18 @@ function RenameFolder(name,uri)
|
|||
dump ("Exception : RenameFolder \n");
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dump("no name or nothing selected\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
dump("no folder tree\n");
|
||||
dump("no folder tree\n");
|
||||
}
|
||||
}
|
||||
|
||||
function MsgEmptyTrash()
|
||||
function MsgEmptyTrash()
|
||||
{
|
||||
var folderTree = GetFolderTree();
|
||||
var startIndex = {};
|
||||
|
@ -143,13 +143,13 @@ function MsgEmptyTrash()
|
|||
messenger.emptyTrash(GetFolderDatasource(), folderResource);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
{
|
||||
dump ("Exception : messenger.emptyTrash \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function MsgCompactFolder(isAll)
|
||||
function MsgCompactFolder(isAll)
|
||||
{
|
||||
// Get the selected folders.
|
||||
var selectedFolders = GetSelectedMsgFolders();
|
||||
|
@ -165,7 +165,7 @@ function MsgCompactFolder(isAll)
|
|||
var expungedBytes = msgfolder.expungedBytes;
|
||||
|
||||
if (expungedBytes > 0)
|
||||
{
|
||||
{
|
||||
if (gDBView)
|
||||
gCurrentlyDisplayedMessage = gDBView.currentlyDisplayedMessage;
|
||||
|
||||
|
@ -178,7 +178,7 @@ function MsgCompactFolder(isAll)
|
|||
if (!isAll) //you have one local folder with no room to compact
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
messenger.compactFolder(GetFolderDatasource(), resource, isAll);
|
||||
|
@ -248,7 +248,7 @@ function MsgFolderProperties(tabID)
|
|||
}
|
||||
|
||||
if (msgFolder.flags & MSG_FOLDER_FLAG_VIRTUAL)
|
||||
{
|
||||
{
|
||||
// virtual folders get there own property dialog that contains all of the
|
||||
// search information related to the virtual folder.
|
||||
MsgVirtualFolderProperties(true);
|
||||
|
@ -265,7 +265,7 @@ function MsgFolderProperties(tabID)
|
|||
"chrome,centerscreen,titlebar,modal",
|
||||
{preselectedURI:preselectedURI, serverType:serverType,
|
||||
msgWindow:msgWindow, title:windowTitle,
|
||||
okCallback:FolderProperties,
|
||||
okCallback:FolderProperties,
|
||||
tabID:tabID, name:name,
|
||||
rebuildSummaryCallback:RebuildSummaryFile});
|
||||
}
|
||||
|
@ -305,15 +305,15 @@ function MsgToggleMessagePane()
|
|||
ChangeMessagePaneVisibility(IsMessagePaneCollapsed());
|
||||
}
|
||||
|
||||
function MsgSetFolderCharset()
|
||||
function MsgSetFolderCharset()
|
||||
{
|
||||
MsgFolderProperties();
|
||||
}
|
||||
|
||||
// Given a URI we would like to return corresponding message folder here.
|
||||
// An additonal input param which specifies whether or not to check folder
|
||||
// An additonal input param which specifies whether or not to check folder
|
||||
// attributes (like if there exists a parent or is it a server) is also passed
|
||||
// to this routine. Qualifying against those checks would return an existing
|
||||
// to this routine. Qualifying against those checks would return an existing
|
||||
// folder. Callers who don't want to check those attributes will specify the
|
||||
// same and then this routine will simply return a msgfolder. This scenario
|
||||
// applies to a new imap account creation where special folders are created
|
||||
|
@ -344,5 +344,5 @@ function GetResourceFromUri(uri)
|
|||
var resource = RDF.GetResource(uri);
|
||||
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
|
||||
var okCallback = 0;
|
||||
var gCanRename = true;
|
||||
var gOkButton;
|
||||
var gNameInput;
|
||||
|
||||
function abNameOnLoad()
|
||||
{
|
||||
var abName = "";
|
||||
|
||||
gOkButton = document.documentElement.getButton('accept');
|
||||
|
||||
// look in arguments[0] for parameters
|
||||
if ("arguments" in window && window.arguments[0])
|
||||
{
|
||||
if ("title" in window.arguments[0])
|
||||
document.title = window.arguments[0].title;
|
||||
|
||||
if ("okCallback" in window.arguments[0])
|
||||
top.okCallback = window.arguments[0].okCallback;
|
||||
|
||||
if ("name" in window.arguments[0])
|
||||
abName = window.arguments[0].name;
|
||||
|
||||
if ("canRename" in window.arguments[0])
|
||||
gCanRename = window.arguments[0].canRename;
|
||||
}
|
||||
|
||||
// focus on input
|
||||
gNameInput = document.getElementById('name');
|
||||
if (gNameInput) {
|
||||
if (abName)
|
||||
gNameInput.value = abName;
|
||||
|
||||
if (gCanRename)
|
||||
gNameInput.focus();
|
||||
else
|
||||
gNameInput.disabled = true;
|
||||
}
|
||||
|
||||
abNameDoOkEnabling()
|
||||
|
||||
moveToAlertPosition();
|
||||
}
|
||||
|
||||
function abNameOKButton()
|
||||
{
|
||||
if (top.okCallback && gCanRename)
|
||||
top.okCallback(gNameInput.value.replace(/^\s+|\s+$/g, ''));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function abNameDoOkEnabling()
|
||||
{
|
||||
gOkButton.disabled = !/\S/.test(gNameInput.value);
|
||||
}
|
|
@ -47,7 +47,7 @@ gPrefs = gPrefs.QueryInterface(Components.interfaces.nsIPrefBranch);
|
|||
|
||||
var gProfileDirURL;
|
||||
|
||||
var gMapItURLFormat = gPrefs.getComplexValue("mail.addr_book.mapit_url.format",
|
||||
var gMapItURLFormat = gPrefs.getComplexValue("mail.addr_book.mapit_url.format",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
|
||||
var gAddrbookSession = Components.classes["@mozilla.org/addressbook/services/session;1"].getService().QueryInterface(Components.interfaces.nsIAddrBookSession);
|
||||
|
@ -91,83 +91,83 @@ function OnLoadCardView()
|
|||
zCustom3 = gAddressBookBundle.getString("propertyCustom3");
|
||||
zCustom4 = gAddressBookBundle.getString("propertyCustom4");
|
||||
|
||||
var doc = document;
|
||||
|
||||
/* data for address book, prefixes: "cvb" = card view box
|
||||
"cvh" = crad view header
|
||||
"cv" = card view (normal fields) */
|
||||
cvData = new Object;
|
||||
var doc = document;
|
||||
|
||||
// Card View Box
|
||||
cvData.CardViewBox = doc.getElementById("CardViewInnerBox");
|
||||
// Title
|
||||
cvData.CardTitle = doc.getElementById("CardTitle");
|
||||
// Name section
|
||||
cvData.cvbContact = doc.getElementById("cvbContact");
|
||||
cvData.cvhContact = doc.getElementById("cvhContact");
|
||||
cvData.cvNickname = doc.getElementById("cvNickname");
|
||||
cvData.cvDisplayName = doc.getElementById("cvDisplayName");
|
||||
cvData.cvEmail1Box = doc.getElementById("cvEmail1Box");
|
||||
cvData.cvEmail1 = doc.getElementById("cvEmail1");
|
||||
cvData.cvScreennameBox = doc.getElementById("cvScreennameBox");
|
||||
/* data for address book, prefixes: "cvb" = card view box
|
||||
"cvh" = crad view header
|
||||
"cv" = card view (normal fields) */
|
||||
cvData = new Object;
|
||||
|
||||
// Card View Box
|
||||
cvData.CardViewBox = doc.getElementById("CardViewInnerBox");
|
||||
// Title
|
||||
cvData.CardTitle = doc.getElementById("CardTitle");
|
||||
// Name section
|
||||
cvData.cvbContact = doc.getElementById("cvbContact");
|
||||
cvData.cvhContact = doc.getElementById("cvhContact");
|
||||
cvData.cvNickname = doc.getElementById("cvNickname");
|
||||
cvData.cvDisplayName = doc.getElementById("cvDisplayName");
|
||||
cvData.cvEmail1Box = doc.getElementById("cvEmail1Box");
|
||||
cvData.cvEmail1 = doc.getElementById("cvEmail1");
|
||||
cvData.cvScreennameBox = doc.getElementById("cvScreennameBox");
|
||||
cvData.cvAimPresence = doc.getElementById("cvAimPresence");
|
||||
cvData.cvScreenname = doc.getElementById("cvScreenname");
|
||||
cvData.cvBuddyIcon = doc.getElementById("cvBuddyIcon");
|
||||
cvData.cvListNameBox = doc.getElementById("cvListNameBox");
|
||||
cvData.cvListName = doc.getElementById("cvListName");
|
||||
cvData.cvEmail2Box = doc.getElementById("cvEmail2Box");
|
||||
cvData.cvEmail2 = doc.getElementById("cvEmail2");
|
||||
// Home section
|
||||
cvData.cvbHome = doc.getElementById("cvbHome");
|
||||
cvData.cvhHome = doc.getElementById("cvhHome");
|
||||
cvData.cvHomeAddress = doc.getElementById("cvHomeAddress");
|
||||
cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2");
|
||||
cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip");
|
||||
cvData.cvHomeCountry = doc.getElementById("cvHomeCountry");
|
||||
cvData.cvScreenname = doc.getElementById("cvScreenname");
|
||||
cvData.cvBuddyIcon = doc.getElementById("cvBuddyIcon");
|
||||
cvData.cvListNameBox = doc.getElementById("cvListNameBox");
|
||||
cvData.cvListName = doc.getElementById("cvListName");
|
||||
cvData.cvEmail2Box = doc.getElementById("cvEmail2Box");
|
||||
cvData.cvEmail2 = doc.getElementById("cvEmail2");
|
||||
// Home section
|
||||
cvData.cvbHome = doc.getElementById("cvbHome");
|
||||
cvData.cvhHome = doc.getElementById("cvhHome");
|
||||
cvData.cvHomeAddress = doc.getElementById("cvHomeAddress");
|
||||
cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2");
|
||||
cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip");
|
||||
cvData.cvHomeCountry = doc.getElementById("cvHomeCountry");
|
||||
cvData.cvbHomeMapItBox = doc.getElementById("cvbHomeMapItBox");
|
||||
cvData.cvHomeMapIt = doc.getElementById("cvHomeMapIt");
|
||||
cvData.cvHomeWebPageBox = doc.getElementById("cvHomeWebPageBox");
|
||||
cvData.cvHomeWebPage = doc.getElementById("cvHomeWebPage");
|
||||
// Other section
|
||||
cvData.cvbOther = doc.getElementById("cvbOther");
|
||||
cvData.cvhOther = doc.getElementById("cvhOther");
|
||||
cvData.cvCustom1 = doc.getElementById("cvCustom1");
|
||||
cvData.cvCustom2 = doc.getElementById("cvCustom2");
|
||||
cvData.cvCustom3 = doc.getElementById("cvCustom3");
|
||||
cvData.cvCustom4 = doc.getElementById("cvCustom4");
|
||||
cvData.cvNotes = doc.getElementById("cvNotes");
|
||||
cvData.cvHomeWebPageBox = doc.getElementById("cvHomeWebPageBox");
|
||||
cvData.cvHomeWebPage = doc.getElementById("cvHomeWebPage");
|
||||
// Other section
|
||||
cvData.cvbOther = doc.getElementById("cvbOther");
|
||||
cvData.cvhOther = doc.getElementById("cvhOther");
|
||||
cvData.cvCustom1 = doc.getElementById("cvCustom1");
|
||||
cvData.cvCustom2 = doc.getElementById("cvCustom2");
|
||||
cvData.cvCustom3 = doc.getElementById("cvCustom3");
|
||||
cvData.cvCustom4 = doc.getElementById("cvCustom4");
|
||||
cvData.cvNotes = doc.getElementById("cvNotes");
|
||||
// Description section (mailing lists only)
|
||||
cvData.cvbDescription = doc.getElementById("cvbDescription");
|
||||
cvData.cvhDescription = doc.getElementById("cvhDescription");
|
||||
cvData.cvDescription = doc.getElementById("cvDescription");
|
||||
cvData.cvbDescription = doc.getElementById("cvbDescription");
|
||||
cvData.cvhDescription = doc.getElementById("cvhDescription");
|
||||
cvData.cvDescription = doc.getElementById("cvDescription");
|
||||
// Addresses section (mailing lists only)
|
||||
cvData.cvbAddresses = doc.getElementById("cvbAddresses");
|
||||
cvData.cvhAddresses = doc.getElementById("cvhAddresses");
|
||||
cvData.cvAddresses = doc.getElementById("cvAddresses");
|
||||
// Phone section
|
||||
cvData.cvbPhone = doc.getElementById("cvbPhone");
|
||||
cvData.cvhPhone = doc.getElementById("cvhPhone");
|
||||
cvData.cvPhWork = doc.getElementById("cvPhWork");
|
||||
cvData.cvPhHome = doc.getElementById("cvPhHome");
|
||||
cvData.cvPhFax = doc.getElementById("cvPhFax");
|
||||
cvData.cvPhCellular = doc.getElementById("cvPhCellular");
|
||||
cvData.cvPhPager = doc.getElementById("cvPhPager");
|
||||
// Work section
|
||||
cvData.cvbWork = doc.getElementById("cvbWork");
|
||||
cvData.cvhWork = doc.getElementById("cvhWork");
|
||||
cvData.cvJobTitle = doc.getElementById("cvJobTitle");
|
||||
cvData.cvDepartment = doc.getElementById("cvDepartment");
|
||||
cvData.cvCompany = doc.getElementById("cvCompany");
|
||||
cvData.cvWorkAddress = doc.getElementById("cvWorkAddress");
|
||||
cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2");
|
||||
cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip");
|
||||
cvData.cvWorkCountry = doc.getElementById("cvWorkCountry");
|
||||
cvData.cvbAddresses = doc.getElementById("cvbAddresses");
|
||||
cvData.cvhAddresses = doc.getElementById("cvhAddresses");
|
||||
cvData.cvAddresses = doc.getElementById("cvAddresses");
|
||||
// Phone section
|
||||
cvData.cvbPhone = doc.getElementById("cvbPhone");
|
||||
cvData.cvhPhone = doc.getElementById("cvhPhone");
|
||||
cvData.cvPhWork = doc.getElementById("cvPhWork");
|
||||
cvData.cvPhHome = doc.getElementById("cvPhHome");
|
||||
cvData.cvPhFax = doc.getElementById("cvPhFax");
|
||||
cvData.cvPhCellular = doc.getElementById("cvPhCellular");
|
||||
cvData.cvPhPager = doc.getElementById("cvPhPager");
|
||||
// Work section
|
||||
cvData.cvbWork = doc.getElementById("cvbWork");
|
||||
cvData.cvhWork = doc.getElementById("cvhWork");
|
||||
cvData.cvJobTitle = doc.getElementById("cvJobTitle");
|
||||
cvData.cvDepartment = doc.getElementById("cvDepartment");
|
||||
cvData.cvCompany = doc.getElementById("cvCompany");
|
||||
cvData.cvWorkAddress = doc.getElementById("cvWorkAddress");
|
||||
cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2");
|
||||
cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip");
|
||||
cvData.cvWorkCountry = doc.getElementById("cvWorkCountry");
|
||||
cvData.cvbWorkMapItBox = doc.getElementById("cvbWorkMapItBox");
|
||||
cvData.cvWorkMapIt = doc.getElementById("cvWorkMapIt");
|
||||
cvData.cvWorkWebPageBox = doc.getElementById("cvWorkWebPageBox");
|
||||
cvData.cvWorkWebPage = doc.getElementById("cvWorkWebPage");
|
||||
cvData.cvWorkWebPageBox = doc.getElementById("cvWorkWebPageBox");
|
||||
cvData.cvWorkWebPage = doc.getElementById("cvWorkWebPage");
|
||||
}
|
||||
|
||||
|
||||
// XXX todo
|
||||
// some similar code (in spirit) already exists, see OnLoadEditList()
|
||||
// perhaps we could combine and put in abCommon.js?
|
||||
|
@ -196,7 +196,7 @@ function GoIM()
|
|||
function DisplayCardViewPane(card)
|
||||
{
|
||||
var generatedName = gAddrbookSession.generateNameFromCard(card, gPrefs.getIntPref("mail.addr_book.lastnamefirst"));
|
||||
|
||||
|
||||
var data = top.cvData;
|
||||
var visible;
|
||||
|
||||
|
@ -211,7 +211,7 @@ function DisplayCardViewPane(card)
|
|||
cvSetNode(data.CardTitle, gAddressBookBundle.getFormattedString("viewListTitle", [generatedName]));
|
||||
else
|
||||
cvSetNode(data.CardTitle, gAddressBookBundle.getFormattedString("viewCardTitle", [titleString]));
|
||||
|
||||
|
||||
// Contact section
|
||||
cvSetNodeWithLabel(data.cvNickname, zNickname, card.nickName);
|
||||
|
||||
|
@ -223,7 +223,7 @@ function DisplayCardViewPane(card)
|
|||
|
||||
visible = HandleLink(data.cvListName, zListName, card.displayName, data.cvListNameBox, "mailto:" + encodeURIComponent(GenerateAddressFromCard(card))) || visible;
|
||||
}
|
||||
else {
|
||||
else {
|
||||
// listname always hidden if not a mailing list
|
||||
cvSetVisible(data.cvListNameBox, false);
|
||||
|
||||
|
@ -234,15 +234,15 @@ function DisplayCardViewPane(card)
|
|||
|
||||
var goimURL = "aim:goim?screenname=" + card.aimScreenName;
|
||||
var hasScreenName = HandleLink(data.cvScreenname, zScreenName, card.aimScreenName, data.cvScreennameBox, goimURL);
|
||||
|
||||
|
||||
data.cvAimPresence.removeAttribute("src");
|
||||
data.cvAimPresence.removeAttribute("url");
|
||||
data.cvAimPresence.setAttribute("width","0");
|
||||
|
||||
#if 0
|
||||
// for now, disable the presence check since we don't really support this anymore but we may again in the future.
|
||||
// for now, disable the presence check since we don't really support this anymore but we may again in the future.
|
||||
// I'm leaving the code here for historical reference. See Bug #295726.
|
||||
data.cvAimPresence.setAttribute("src","http://big.oscar.aol.com:80/" + card.aimScreenName + "?on_url=http://ncmail.netscape.com/include/nc/images/online.gif&off_url=http://ncmail.netscape.com/include/nc/images/offline.gif");
|
||||
data.cvAimPresence.setAttribute("src","http://big.oscar.aol.com:80/" + card.aimScreenName + "?on_url=http://ncmail.netscape.com/include/nc/images/online.gif&off_url=http://ncmail.netscape.com/include/nc/images/offline.gif");
|
||||
data.cvAimPresence.setAttribute("url", goimURL);
|
||||
data.cvAimPresence.setAttribute("width","16");
|
||||
#endif
|
||||
|
@ -250,48 +250,48 @@ function DisplayCardViewPane(card)
|
|||
visible = hasScreenName || visible;
|
||||
visible = HandleLink(data.cvEmail2, zSecondaryEmail, card.secondEmail, data.cvEmail2Box, "mailto:" + card.secondEmail) || visible;
|
||||
|
||||
// Home section
|
||||
visible = cvSetNode(data.cvHomeAddress, card.homeAddress);
|
||||
visible = cvSetNode(data.cvHomeAddress2, card.homeAddress2) || visible;
|
||||
visible = cvSetCityStateZip(data.cvHomeCityStZip, card.homeCity, card.homeState, card.homeZipCode) || visible;
|
||||
visible = cvSetNode(data.cvHomeCountry, card.homeCountry) || visible;
|
||||
// Home section
|
||||
visible = cvSetNode(data.cvHomeAddress, card.homeAddress);
|
||||
visible = cvSetNode(data.cvHomeAddress2, card.homeAddress2) || visible;
|
||||
visible = cvSetCityStateZip(data.cvHomeCityStZip, card.homeCity, card.homeState, card.homeZipCode) || visible;
|
||||
visible = cvSetNode(data.cvHomeCountry, card.homeCountry) || visible;
|
||||
if (visible) {
|
||||
var homeMapItUrl = CreateMapItURL(card.homeAddress, card.homeAddress2, card.homeCity, card.homeState, card.homeZipCode, card.homeCountry);
|
||||
if (homeMapItUrl) {
|
||||
cvSetVisible(data.cvbHomeMapItBox, true);
|
||||
cvSetVisible(data.cvbHomeMapItBox, true);
|
||||
data.cvHomeMapIt.setAttribute('url', homeMapItUrl);
|
||||
}
|
||||
else {
|
||||
cvSetVisible(data.cvbHomeMapItBox, false);
|
||||
cvSetVisible(data.cvbHomeMapItBox, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
cvSetVisible(data.cvbHomeMapItBox, false);
|
||||
cvSetVisible(data.cvbHomeMapItBox, false);
|
||||
}
|
||||
|
||||
visible = HandleLink(data.cvHomeWebPage, "", card.webPage2, data.cvHomeWebPageBox, card.webPage2) || visible;
|
||||
|
||||
cvSetVisible(data.cvhHome, visible);
|
||||
cvSetVisible(data.cvbHome, visible);
|
||||
cvSetVisible(data.cvhHome, visible);
|
||||
cvSetVisible(data.cvbHome, visible);
|
||||
if (card.isMailList) {
|
||||
// Description section
|
||||
visible = cvSetNode(data.cvDescription, card.notes)
|
||||
cvSetVisible(data.cvbDescription, visible);
|
||||
visible = cvSetNode(data.cvDescription, card.notes)
|
||||
cvSetVisible(data.cvbDescription, visible);
|
||||
|
||||
// Addresses section
|
||||
visible = cvAddAddressNodes(data.cvAddresses, card.mailListURI);
|
||||
cvSetVisible(data.cvbAddresses, visible);
|
||||
|
||||
visible = cvAddAddressNodes(data.cvAddresses, card.mailListURI);
|
||||
cvSetVisible(data.cvbAddresses, visible);
|
||||
|
||||
// Other section, not shown for mailing lists.
|
||||
cvSetVisible(data.cvbOther, false);
|
||||
}
|
||||
else {
|
||||
// Other section
|
||||
visible = cvSetNodeWithLabel(data.cvCustom1, zCustom1, card.custom1);
|
||||
visible = cvSetNodeWithLabel(data.cvCustom2, zCustom2, card.custom2) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom3, zCustom3, card.custom3) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom4, zCustom4, card.custom4) || visible;
|
||||
visible = cvSetNode(data.cvNotes, card.notes) || visible;
|
||||
// Other section
|
||||
visible = cvSetNodeWithLabel(data.cvCustom1, zCustom1, card.custom1);
|
||||
visible = cvSetNodeWithLabel(data.cvCustom2, zCustom2, card.custom2) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom3, zCustom3, card.custom3) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom4, zCustom4, card.custom4) || visible;
|
||||
visible = cvSetNode(data.cvNotes, card.notes) || visible;
|
||||
visible = setBuddyIcon(card, data.cvBuddyIcon) || visible;
|
||||
|
||||
cvSetVisible(data.cvhOther, visible);
|
||||
|
@ -304,46 +304,46 @@ function DisplayCardViewPane(card)
|
|||
cvSetVisible(data.cvbAddresses, false);
|
||||
}
|
||||
|
||||
// Phone section
|
||||
visible = cvSetNodeWithLabel(data.cvPhWork, zWork, card.workPhone);
|
||||
visible = cvSetNodeWithLabel(data.cvPhHome, zHome, card.homePhone) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhFax, zFax, card.faxNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhCellular, zCellular, card.cellularNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhPager, zPager, card.pagerNumber) || visible;
|
||||
cvSetVisible(data.cvhPhone, visible);
|
||||
cvSetVisible(data.cvbPhone, visible);
|
||||
// Work section
|
||||
visible = cvSetNode(data.cvJobTitle, card.jobTitle);
|
||||
visible = cvSetNode(data.cvDepartment, card.department) || visible;
|
||||
visible = cvSetNode(data.cvCompany, card.company) || visible;
|
||||
|
||||
// Phone section
|
||||
visible = cvSetNodeWithLabel(data.cvPhWork, zWork, card.workPhone);
|
||||
visible = cvSetNodeWithLabel(data.cvPhHome, zHome, card.homePhone) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhFax, zFax, card.faxNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhCellular, zCellular, card.cellularNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhPager, zPager, card.pagerNumber) || visible;
|
||||
cvSetVisible(data.cvhPhone, visible);
|
||||
cvSetVisible(data.cvbPhone, visible);
|
||||
// Work section
|
||||
visible = cvSetNode(data.cvJobTitle, card.jobTitle);
|
||||
visible = cvSetNode(data.cvDepartment, card.department) || visible;
|
||||
visible = cvSetNode(data.cvCompany, card.company) || visible;
|
||||
|
||||
var addressVisible = cvSetNode(data.cvWorkAddress, card.workAddress);
|
||||
addressVisible = cvSetNode(data.cvWorkAddress2, card.workAddress2) || addressVisible;
|
||||
addressVisible = cvSetCityStateZip(data.cvWorkCityStZip, card.workCity, card.workState, card.workZipCode) || addressVisible;
|
||||
addressVisible = cvSetNode(data.cvWorkCountry, card.workCountry) || addressVisible;
|
||||
addressVisible = cvSetNode(data.cvWorkAddress2, card.workAddress2) || addressVisible;
|
||||
addressVisible = cvSetCityStateZip(data.cvWorkCityStZip, card.workCity, card.workState, card.workZipCode) || addressVisible;
|
||||
addressVisible = cvSetNode(data.cvWorkCountry, card.workCountry) || addressVisible;
|
||||
|
||||
if (addressVisible) {
|
||||
var workMapItUrl = CreateMapItURL(card.workAddress, card.workAddress2, card.workCity, card.workState, card.workZipCode, card.workCountry);
|
||||
data.cvWorkMapIt.setAttribute('url', workMapItUrl);
|
||||
if (workMapItUrl) {
|
||||
cvSetVisible(data.cvbWorkMapItBox, true);
|
||||
cvSetVisible(data.cvbWorkMapItBox, true);
|
||||
data.cvWorkMapIt.setAttribute('url', workMapItUrl);
|
||||
}
|
||||
else {
|
||||
cvSetVisible(data.cvbWorkMapItBox, false);
|
||||
cvSetVisible(data.cvbWorkMapItBox, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
cvSetVisible(data.cvbWorkMapItBox, false);
|
||||
cvSetVisible(data.cvbWorkMapItBox, false);
|
||||
}
|
||||
|
||||
visible = HandleLink(data.cvWorkWebPage, "", card.webPage1, data.cvWorkWebPageBox, card.webPage1) || addressVisible || visible;
|
||||
|
||||
cvSetVisible(data.cvhWork, visible);
|
||||
cvSetVisible(data.cvbWork, visible);
|
||||
cvSetVisible(data.cvhWork, visible);
|
||||
cvSetVisible(data.cvbWork, visible);
|
||||
|
||||
// make the card view box visible
|
||||
cvSetVisible(top.cvData.CardViewBox, true);
|
||||
// make the card view box visible
|
||||
cvSetVisible(top.cvData.CardViewBox, true);
|
||||
}
|
||||
|
||||
function setBuddyIcon(card, buddyIcon)
|
||||
|
@ -364,7 +364,7 @@ function setBuddyIcon(card, buddyIcon)
|
|||
|
||||
// check if the file exists
|
||||
var file = gFileHandler.getFileFromURLSpec(iconURLStr);
|
||||
|
||||
|
||||
// check if the file exists
|
||||
// is this a perf hit? (how expensive is stat()?)
|
||||
if (file.exists()) {
|
||||
|
@ -376,14 +376,14 @@ function setBuddyIcon(card, buddyIcon)
|
|||
catch (ex) {
|
||||
// can get here if no screenname
|
||||
}
|
||||
|
||||
|
||||
buddyIcon.setAttribute("src", "");
|
||||
return false;
|
||||
}
|
||||
|
||||
function ClearCardViewPane()
|
||||
{
|
||||
cvSetVisible(top.cvData.CardViewBox, false);
|
||||
cvSetVisible(top.cvData.CardViewBox, false);
|
||||
}
|
||||
|
||||
function cvSetNodeWithLabel(node, label, text)
|
||||
|
@ -400,58 +400,58 @@ function cvSetNodeWithLabel(node, label, text)
|
|||
|
||||
function cvSetCityStateZip(node, city, state, zip)
|
||||
{
|
||||
var text = "";
|
||||
|
||||
if ( city )
|
||||
{
|
||||
text = city;
|
||||
if ( state || zip )
|
||||
text += ", ";
|
||||
}
|
||||
if ( state )
|
||||
text += state + " ";
|
||||
if ( zip )
|
||||
text += zip;
|
||||
|
||||
return cvSetNode(node, text);
|
||||
var text = "";
|
||||
|
||||
if ( city )
|
||||
{
|
||||
text = city;
|
||||
if ( state || zip )
|
||||
text += ", ";
|
||||
}
|
||||
if ( state )
|
||||
text += state + " ";
|
||||
if ( zip )
|
||||
text += zip;
|
||||
|
||||
return cvSetNode(node, text);
|
||||
}
|
||||
|
||||
function cvSetNode(node, text)
|
||||
{
|
||||
if ( node )
|
||||
{
|
||||
if ( !node.hasChildNodes() )
|
||||
{
|
||||
var textNode = document.createTextNode(text);
|
||||
node.appendChild(textNode);
|
||||
}
|
||||
else if ( node.childNodes.length == 1 )
|
||||
node.childNodes[0].nodeValue = text;
|
||||
if ( node )
|
||||
{
|
||||
if ( !node.hasChildNodes() )
|
||||
{
|
||||
var textNode = document.createTextNode(text);
|
||||
node.appendChild(textNode);
|
||||
}
|
||||
else if ( node.childNodes.length == 1 )
|
||||
node.childNodes[0].nodeValue = text;
|
||||
|
||||
var visible;
|
||||
|
||||
if ( text )
|
||||
visible = true;
|
||||
else
|
||||
visible = false;
|
||||
|
||||
cvSetVisible(node, visible);
|
||||
}
|
||||
var visible;
|
||||
|
||||
return visible;
|
||||
if ( text )
|
||||
visible = true;
|
||||
else
|
||||
visible = false;
|
||||
|
||||
cvSetVisible(node, visible);
|
||||
}
|
||||
|
||||
return visible;
|
||||
}
|
||||
|
||||
function cvAddAddressNodes(node, uri)
|
||||
{
|
||||
var visible = false;
|
||||
if ( node )
|
||||
{
|
||||
var displayName = "";
|
||||
if ( node )
|
||||
{
|
||||
var displayName = "";
|
||||
var address = "";
|
||||
|
||||
var editList = GetDirectoryFromURI(uri);
|
||||
var addressList = editList.addressLists;
|
||||
|
||||
|
||||
if (addressList) {
|
||||
var total = addressList.Count();
|
||||
if (total > 0) {
|
||||
|
@ -459,34 +459,34 @@ function cvAddAddressNodes(node, uri)
|
|||
node.removeChild(node.lastChild);
|
||||
}
|
||||
for (i = 0; i < total; i++ ) {
|
||||
var descNode = document.createElement("description");
|
||||
address = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).primaryEmail;
|
||||
displayName = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).displayName;
|
||||
var descNode = document.createElement("description");
|
||||
address = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).primaryEmail;
|
||||
displayName = addressList.GetElementAt(i).QueryInterface(Components.interfaces.nsIAbCard).displayName;
|
||||
descNode.setAttribute("class", "CardViewLink");
|
||||
node.appendChild(descNode);
|
||||
|
||||
node.appendChild(descNode);
|
||||
|
||||
var linkNode = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
|
||||
linkNode.setAttribute("id", "addr#" + i);
|
||||
linkNode.setAttribute("href", "mailto:" + address);
|
||||
descNode.appendChild(linkNode);
|
||||
|
||||
|
||||
var textNode = document.createTextNode(displayName + " <" + address + ">");
|
||||
linkNode.appendChild(textNode);
|
||||
}
|
||||
visible = true;
|
||||
visible = true;
|
||||
}
|
||||
}
|
||||
cvSetVisible(node, visible);
|
||||
}
|
||||
return visible;
|
||||
}
|
||||
cvSetVisible(node, visible);
|
||||
}
|
||||
return visible;
|
||||
}
|
||||
|
||||
function cvSetVisible(node, visible)
|
||||
{
|
||||
if ( visible )
|
||||
node.removeAttribute("collapsed");
|
||||
else
|
||||
node.setAttribute("collapsed", "true");
|
||||
if ( visible )
|
||||
node.removeAttribute("collapsed");
|
||||
else
|
||||
node.setAttribute("collapsed", "true");
|
||||
}
|
||||
|
||||
function HandleLink(node, label, value, box, link)
|
||||
|
@ -505,7 +505,7 @@ function MapIt(id)
|
|||
try {
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.launchExternalURL(button.getAttribute('url'));
|
||||
messenger.launchExternalURL(button.getAttribute('url'));
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ function CreateMapItURL(address1, address2, city, state, zip, country)
|
|||
urlFormat = urlFormat.replace("@CI", encodeURIComponent(city));
|
||||
urlFormat = urlFormat.replace("@ST", encodeURIComponent(state));
|
||||
urlFormat = urlFormat.replace("@ZI", encodeURIComponent(zip));
|
||||
|
||||
|
||||
return urlFormat;
|
||||
}
|
||||
|
||||
|
@ -530,7 +530,7 @@ function openLink(id)
|
|||
try {
|
||||
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||
messenger.launchExternalURL(document.getElementById(id).getAttribute("href"));
|
||||
messenger.launchExternalURL(document.getElementById(id).getAttribute("href"));
|
||||
} catch (ex) {}
|
||||
|
||||
// return false, so we don't load the href in the addressbook window
|
||||
|
|
|
@ -93,11 +93,11 @@ var ResultsPaneController =
|
|||
var numSelected;
|
||||
var enabled = false;
|
||||
if (gAbView && gAbView.selection) {
|
||||
if (gAbView.directory)
|
||||
if (gAbView.directory)
|
||||
enabled = gAbView.directory.operations & gAbView.directory.opWrite;
|
||||
numSelected = gAbView.selection.count;
|
||||
}
|
||||
else
|
||||
else
|
||||
numSelected = 0;
|
||||
|
||||
// fix me, don't update on isCommandEnabled
|
||||
|
@ -196,9 +196,9 @@ var DirPaneController =
|
|||
case "button_delete":
|
||||
if (command == "cmd_delete")
|
||||
goSetMenuValue(command, "valueAddressBook");
|
||||
|
||||
|
||||
selectedDir = GetSelectedDirectory();
|
||||
|
||||
|
||||
if (selectedDir == kPersonalAddressbookURI || selectedDir == kCollectedAddressbookURI)
|
||||
return false;
|
||||
|
||||
|
@ -317,7 +317,7 @@ function GetParentRow(aTree, aRow)
|
|||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
|
||||
function InitCommonJS()
|
||||
{
|
||||
dirTree = document.getElementById("dirTree");
|
||||
|
@ -349,7 +349,7 @@ function GetSelectedCardTypes()
|
|||
|
||||
var mailingListCnt = 0;
|
||||
var cardCnt = 0;
|
||||
for (var i = 0; i < count; i++) {
|
||||
for (var i = 0; i < count; i++) {
|
||||
if (cards[i].isMailList)
|
||||
mailingListCnt++;
|
||||
else
|
||||
|
@ -503,11 +503,11 @@ function goToggleSplitter( id, elementID )
|
|||
}
|
||||
}
|
||||
|
||||
// Generate a list of cards from the selected mailing list
|
||||
// Generate a list of cards from the selected mailing list
|
||||
// and get a comma separated list of card addresses. If the
|
||||
// item selected in the directory pane is not a mailing list,
|
||||
// an empty string is returned.
|
||||
function GetSelectedAddressesFromDirTree()
|
||||
// an empty string is returned.
|
||||
function GetSelectedAddressesFromDirTree()
|
||||
{
|
||||
var addresses = "";
|
||||
|
||||
|
@ -544,7 +544,7 @@ function GetAddressesForCards(cards)
|
|||
if (count > 0)
|
||||
addresses += GenerateAddressFromCard(cards[0]);
|
||||
|
||||
for (var i = 1; i < count; i++) {
|
||||
for (var i = 1; i < count; i++) {
|
||||
var generatedAddress = GenerateAddressFromCard(cards[i]);
|
||||
|
||||
if (generatedAddress)
|
||||
|
@ -566,7 +566,7 @@ function GetNumSelectedCards()
|
|||
}
|
||||
|
||||
// XXX todo
|
||||
// an optimization might be to make this return
|
||||
// an optimization might be to make this return
|
||||
// the selected ranges, which would be faster
|
||||
// when the user does large selections, but for now, let's keep it simple.
|
||||
function GetSelectedRows()
|
||||
|
@ -601,9 +601,9 @@ function GetSelectedAbCards()
|
|||
// then use the ab view from sidebar (gCurFrame is from sidebarOverlay.js)
|
||||
const abPanelUrl = "chrome://messenger/content/addressbook/addressbook-panel.xul";
|
||||
if (document.getElementById("sidebar-box")) {
|
||||
if (gCurFrame &&
|
||||
if (gCurFrame &&
|
||||
gCurFrame.getAttribute("src") == abPanelUrl &&
|
||||
document.commandDispatcher.focusedWindow == gCurFrame.contentDocument.defaultView)
|
||||
document.commandDispatcher.focusedWindow == gCurFrame.contentDocument.defaultView)
|
||||
{
|
||||
abView = gCurFrame.contentDocument.defaultView.gAbView;
|
||||
}
|
||||
|
@ -705,7 +705,7 @@ function CloseAbView()
|
|||
function SetAbView(uri, searchView, sortColumn, sortDirection)
|
||||
{
|
||||
var actualSortColumn;
|
||||
|
||||
|
||||
// make sure sortColumn and sortDirection have non null values before calling gAbView.init
|
||||
if (!sortColumn)
|
||||
sortColumn = kDefaultSortColumn;
|
||||
|
@ -732,7 +732,7 @@ function SetAbView(uri, searchView, sortColumn, sortDirection)
|
|||
boxObject.view = gAbView.QueryInterface(Components.interfaces.nsITreeView);
|
||||
|
||||
UpdateSortIndicators(sortColumn, sortDirection);
|
||||
|
||||
|
||||
return actualSortColumn;
|
||||
}
|
||||
|
||||
|
@ -748,14 +748,14 @@ function ChangeDirectoryByURI(uri)
|
|||
|
||||
if (gAbView && gAbView.URI == uri)
|
||||
return;
|
||||
|
||||
|
||||
var sortColumn = gAbResultsTree.getAttribute("sortCol");
|
||||
var sortDirection = document.getElementById(sortColumn).getAttribute("sortDirection");
|
||||
|
||||
|
||||
var actualSortColumn = SetAbView(uri, false, sortColumn, sortDirection);
|
||||
|
||||
UpdateSortIndicators(actualSortColumn, sortDirection);
|
||||
|
||||
|
||||
// only select the first card if there is a first card
|
||||
if (gAbView && gAbView.getCardFromRow(0)) {
|
||||
SelectFirstCard();
|
||||
|
@ -795,7 +795,7 @@ function SortAndUpdateIndicators(sortColumn, sortDirection)
|
|||
// XXX todo remove once #116341 is fixed
|
||||
if (!sortColumn)
|
||||
return;
|
||||
|
||||
|
||||
UpdateSortIndicators(sortColumn, sortDirection);
|
||||
|
||||
if (gAbView)
|
||||
|
@ -862,9 +862,9 @@ function goNewCardDialog(selectedAB)
|
|||
function goEditCardDialog(abURI, card, okCallback)
|
||||
{
|
||||
window.openDialog("chrome://messenger/content/addressbook/abEditCardDialog.xul",
|
||||
"",
|
||||
"chrome,resizable=no,modal,titlebar,centerscreen",
|
||||
{abURI:abURI, card:card, okCallback:okCallback});
|
||||
"",
|
||||
"chrome,resizable=no,modal,titlebar,centerscreen",
|
||||
{abURI:abURI, card:card, okCallback:okCallback});
|
||||
}
|
||||
|
||||
|
||||
|
@ -905,12 +905,12 @@ function GenerateAddressFromCard(card)
|
|||
|
||||
var email;
|
||||
|
||||
if (card.isMailList)
|
||||
if (card.isMailList)
|
||||
{
|
||||
var directory = GetDirectoryFromURI(card.mailListURI);
|
||||
email = directory.description || card.displayName;
|
||||
}
|
||||
else
|
||||
else
|
||||
email = card.primaryEmail;
|
||||
|
||||
return gHeaderParser.makeFullAddressWString(card.displayName, email);
|
||||
|
@ -936,7 +936,7 @@ function GetParentDirectoryFromMailingListURI(abURI)
|
|||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function DirPaneHasFocus()
|
||||
{
|
||||
|
@ -959,10 +959,10 @@ function GetSelectedDirectory()
|
|||
function onAbSearchKeyPress(event)
|
||||
{
|
||||
// 13 == return
|
||||
if (event && event.keyCode == 13)
|
||||
if (event && event.keyCode == 13)
|
||||
onAbSearchInput(true);
|
||||
}
|
||||
|
||||
|
||||
function onAbSearchInput(returnKeyHit)
|
||||
{
|
||||
if (gSearchInput.showingSearchCriteria && !(returnKeyHit && gSearchInput.value == ""))
|
||||
|
@ -984,7 +984,7 @@ function onAbSearchInput(returnKeyHit)
|
|||
}
|
||||
}
|
||||
|
||||
function SearchInputChanged()
|
||||
function SearchInputChanged()
|
||||
{
|
||||
var clearButton = document.getElementById("clear");
|
||||
if (clearButton) {
|
||||
|
@ -995,9 +995,9 @@ function SearchInputChanged()
|
|||
}
|
||||
}
|
||||
|
||||
function onAbClearSearch()
|
||||
function onAbClearSearch()
|
||||
{
|
||||
if (gSearchInput)
|
||||
if (gSearchInput)
|
||||
gSearchInput.value =""; //on input does not get fired for some reason
|
||||
onAbSearchInput(true);
|
||||
}
|
||||
|
@ -1028,18 +1028,18 @@ function QuickSearchFocus()
|
|||
}
|
||||
|
||||
function onSearchInputBlur(event)
|
||||
{
|
||||
{
|
||||
// if (gQuickSearchFocusEl && gQuickSearchFocusEl.id == 'searchInput') // ignore the blur if we are in the middle of processing the clear button
|
||||
// return;
|
||||
|
||||
if (!gSearchInput.value)
|
||||
gSearchInput.showingSearchCriteria = true;
|
||||
|
||||
|
||||
if (gSearchInput.showingSearchCriteria)
|
||||
gSearchInput.setSearchCriteriaText();
|
||||
}
|
||||
|
||||
var gQuickSearchFocusEl = null;
|
||||
var gQuickSearchFocusEl = null;
|
||||
|
||||
function onClearSearch()
|
||||
{
|
||||
|
@ -1047,7 +1047,7 @@ function onClearSearch()
|
|||
{
|
||||
onAbClearSearch();
|
||||
// this needs to be on a timer otherwise we end up messing up the focus while the Search("") is still happening
|
||||
setTimeout("restoreSearchFocusAfterClear();", 0);
|
||||
setTimeout("restoreSearchFocusAfterClear();", 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1091,12 +1091,12 @@ function setupLdapAutocompleteSession()
|
|||
"@mozilla.org/autocompleteSession;1?type=ldap"].createInstance()
|
||||
.QueryInterface(Components.interfaces.nsILDAPAutoCompleteSession);
|
||||
}
|
||||
|
||||
if (autocompleteDirectory && !gIsOffline) {
|
||||
|
||||
if (autocompleteDirectory && !gIsOffline) {
|
||||
// the compose window code adds an observer on the directory server
|
||||
// prefs, but I don't think we need this here.
|
||||
gCurrentAutocompleteDirectory = autocompleteDirectory;
|
||||
|
||||
|
||||
// fill in the session params if there is a session
|
||||
//
|
||||
if (LDAPSession) {
|
||||
|
@ -1133,9 +1133,9 @@ function setupLdapAutocompleteSession()
|
|||
var windowWatcherSvc = Components.classes[
|
||||
"@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
var domWin =
|
||||
var domWin =
|
||||
window.QueryInterface(Components.interfaces.nsIDOMWindow);
|
||||
var authPrompter =
|
||||
var authPrompter =
|
||||
windowWatcherSvc.getNewAuthPrompter(domWin);
|
||||
|
||||
LDAPSession.authPrompter = authPrompter;
|
||||
|
@ -1143,7 +1143,7 @@ function setupLdapAutocompleteSession()
|
|||
|
||||
// don't search on non-CJK strings shorter than this
|
||||
//
|
||||
try {
|
||||
try {
|
||||
LDAPSession.minStringLength = gPrefs.getIntPref(
|
||||
autocompleteDirectory + ".autoComplete.minStringLength");
|
||||
} catch (ex) {
|
||||
|
@ -1153,7 +1153,7 @@ function setupLdapAutocompleteSession()
|
|||
|
||||
// don't search on CJK strings shorter than this
|
||||
//
|
||||
try {
|
||||
try {
|
||||
LDAPSession.cjkMinStringLength = gPrefs.getIntPref(
|
||||
autocompleteDirectory + ".autoComplete.cjkMinStringLength");
|
||||
} catch (ex) {
|
||||
|
@ -1171,8 +1171,8 @@ function setupLdapAutocompleteSession()
|
|||
// override autocomplete name format?
|
||||
//
|
||||
try {
|
||||
ldapFormatter.nameFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
ldapFormatter.nameFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
".autoComplete.nameFormat",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
} catch (ex) {
|
||||
|
@ -1183,8 +1183,8 @@ function setupLdapAutocompleteSession()
|
|||
// override autocomplete mail address format?
|
||||
//
|
||||
try {
|
||||
ldapFormatter.addressFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
ldapFormatter.addressFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
".autoComplete.addressFormat",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
} catch (ex) {
|
||||
|
@ -1217,8 +1217,8 @@ function setupLdapAutocompleteSession()
|
|||
// override ldap-specific autocomplete entry?
|
||||
//
|
||||
try {
|
||||
ldapFormatter.commentFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
ldapFormatter.commentFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
".autoComplete.commentFormat",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
} catch (innerException) {
|
||||
|
@ -1247,8 +1247,8 @@ function setupLdapAutocompleteSession()
|
|||
// override autocomplete entry formatting?
|
||||
//
|
||||
try {
|
||||
LDAPSession.outputFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
LDAPSession.outputFormat =
|
||||
gPrefs.getComplexValue(autocompleteDirectory +
|
||||
".autoComplete.outputFormat",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
|
||||
|
@ -1259,7 +1259,7 @@ function setupLdapAutocompleteSession()
|
|||
|
||||
// override default search filter template?
|
||||
//
|
||||
try {
|
||||
try {
|
||||
LDAPSession.filterTemplate = gPrefs.getComplexValue(
|
||||
autocompleteDirectory + ".autoComplete.filterTemplate",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
|
@ -1271,20 +1271,20 @@ function setupLdapAutocompleteSession()
|
|||
|
||||
// override default maxHits (currently 100)
|
||||
//
|
||||
try {
|
||||
try {
|
||||
// XXXdmose should really use .autocomplete.maxHits,
|
||||
// but there's no UI for that yet
|
||||
//
|
||||
LDAPSession.maxHits =
|
||||
//
|
||||
LDAPSession.maxHits =
|
||||
gPrefs.getIntPref(autocompleteDirectory + ".maxHits");
|
||||
} catch (ex) {
|
||||
// if this pref isn't there, or is out of range, no big deal.
|
||||
// if this pref isn't there, or is out of range, no big deal.
|
||||
// just let nsLDAPAutoCompleteSession use its default.
|
||||
}
|
||||
|
||||
if (!gSessionAdded) {
|
||||
// if we make it here, we know that session initialization has
|
||||
// succeeded; add the session for all recipients, and
|
||||
// succeeded; add the session for all recipients, and
|
||||
// remember that we've done so
|
||||
var autoCompleteWidget;
|
||||
for (i=1; i <= awGetMaxRecipients(); i++)
|
||||
|
@ -1294,7 +1294,7 @@ function setupLdapAutocompleteSession()
|
|||
{
|
||||
autoCompleteWidget.addSession(LDAPSession);
|
||||
// ldap searches don't insert a default entry with the default domain appended to it
|
||||
// so reduce the minimum results for a popup to 2 in this case.
|
||||
// so reduce the minimum results for a popup to 2 in this case.
|
||||
autoCompleteWidget.minResultsForPopup = 2;
|
||||
|
||||
}
|
||||
|
@ -1307,7 +1307,7 @@ function setupLdapAutocompleteSession()
|
|||
gCurrentAutocompleteDirectory = null;
|
||||
}
|
||||
if (gLDAPSession && gSessionAdded) {
|
||||
for (i=1; i <= awGetMaxRecipients(); i++)
|
||||
for (i=1; i <= awGetMaxRecipients(); i++)
|
||||
document.getElementById("addressCol1#" + i).
|
||||
removeSession(gLDAPSession);
|
||||
gSessionAdded = false;
|
||||
|
|
|
@ -79,16 +79,16 @@
|
|||
<menuitem label="&addtoCcFieldMenu.label;" oncommand="addSelectedAddresses('addr_cc');"/>
|
||||
<menuitem label="&addtoBccFieldMenu.label;" oncommand="addSelectedAddresses('addr_bcc');"/>
|
||||
</popup>
|
||||
|
||||
<vbox id="results_box" flex="1">
|
||||
<separator class="thin"/>
|
||||
<label value="&addressbookPicker.label;" accesskey="&addressbookPicker.accesskey;" control="addressbookList"/>
|
||||
|
||||
<vbox id="results_box" flex="1">
|
||||
<separator class="thin"/>
|
||||
<label value="&addressbookPicker.label;" accesskey="&addressbookPicker.accesskey;" control="addressbookList"/>
|
||||
<hbox id="panel-bar" class="toolbar" align="center">
|
||||
<menulist id="addressbookList"
|
||||
<menulist id="addressbookList"
|
||||
oncommand="AddressBookMenuListChange();" flex="1"
|
||||
persist="value">
|
||||
<menupopup id="addressbookList-menupopup"
|
||||
datasources="rdf:addressdirectory"
|
||||
<menupopup id="addressbookList-menupopup"
|
||||
datasources="rdf:addressdirectory"
|
||||
ref="moz-abdirectory://"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
|
@ -104,11 +104,11 @@
|
|||
</menulist>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
<separator class="thin"/>
|
||||
|
||||
<vbox>
|
||||
<vbox>
|
||||
<label value="&searchInput.label;" accesskey="&searchInput.accesskey;" control="searchInput"/>
|
||||
<textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onblur="onSearchInputBlur(event);"
|
||||
<textbox id="searchInput" flex="1" onfocus="onSearchInputFocus(event);" onblur="onSearchInputBlur(event);"
|
||||
onclick="this.select();" oninput="onAbSearchInput(false);"
|
||||
onkeypress="onAbSearchKeyPress(event);">
|
||||
<button id="quick-search-button" type="menu">
|
||||
|
@ -117,39 +117,39 @@
|
|||
</menupopup>
|
||||
</button>
|
||||
</textbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
<separator class="thin"/>
|
||||
|
||||
<tree id="abResultsTree" flex="1" context="cardProperties" class="plain" sortCol="GeneratedName" persist="sortCol" ondblclick="contactsListDoubleClick(event);">
|
||||
<treecols>
|
||||
<!-- these column ids must match up to the mork column names, see nsIAddrDatabase.idl -->
|
||||
<treecol id="GeneratedName" class="sortDirectionIndicator"
|
||||
<treecol id="GeneratedName" class="sortDirectionIndicator"
|
||||
persist="hidden ordinal width sortDirection" flex="1" label="&GeneratedName.label;" primary="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="PrimaryEmail" class="sortDirectionIndicator"
|
||||
<treecol id="PrimaryEmail" class="sortDirectionIndicator"
|
||||
persist="hidden ordinal width sortDirection" hidden="true"
|
||||
flex="1" label="&PrimaryEmail.label;"/>
|
||||
</treecols>
|
||||
<treechildren ondraggesture="nsDragAndDrop.startDrag(event, abResultsPaneObserver);"/>
|
||||
</tree>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<hbox>
|
||||
<spring flex="1"/>
|
||||
<button id="toButton" label="&toButton.label;" accesskey="&toButton.accesskey;" oncommand="addSelectedAddresses('addr_to')"/>
|
||||
<button id="toButton" label="&toButton.label;" accesskey="&toButton.accesskey;" oncommand="addSelectedAddresses('addr_to')"/>
|
||||
<spring flex="1"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<spring flex="1"/>
|
||||
<button id="ccButton" label="&ccButton.label;" accesskey="&ccButton.accesskey;" oncommand="addSelectedAddresses('addr_cc')"/>
|
||||
<spacer class="thin"/>
|
||||
<button id="bccButton" label="&bccButton.label;" accesskey="&bccButton.accesskey;" oncommand="addSelectedAddresses('addr_bcc')"/>
|
||||
<button id="bccButton" label="&bccButton.label;" accesskey="&bccButton.accesskey;" oncommand="addSelectedAddresses('addr_bcc')"/>
|
||||
<spring flex="1"/>
|
||||
</hbox>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
</vbox>
|
||||
</page>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0"?>
|
||||
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
@ -36,7 +36,7 @@
|
|||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
|
||||
<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abMailListDialog.dtd">
|
||||
|
@ -90,18 +90,18 @@
|
|||
<listcell class="addressingWidgetCell">
|
||||
<textbox id="addressCol1#1" class="plain textbox-addressingWidget uri-element"
|
||||
type="autocomplete" allowevents="true" flex="1"
|
||||
searchSessions="addrbook" timeout="300" maxrows="4"
|
||||
searchSessions="addrbook" timeout="300" maxrows="4"
|
||||
autoFill="true" autoFillAfterMatch="true" forceComplete="true"
|
||||
minResultsForPopup="3"
|
||||
ontextentered="awRecipientTextCommand(eventParam, this)"
|
||||
ontextentered="awRecipientTextCommand(eventParam, this)"
|
||||
oninput="setupLdapAutocompleteSession();"
|
||||
onkeypress="handleKeyPress(this, event);"
|
||||
onkeydown="awRecipientKeyDown(event, this);"
|
||||
onclick="awNotAnEmptyArea(event);">
|
||||
<image onclick="awNotAnEmptyArea(event)" class="person-icon"/>
|
||||
</textbox>
|
||||
</listcell>
|
||||
</listcell>
|
||||
</listitem>
|
||||
</listbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</dialog>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
var cvPrefs = 0;
|
||||
var addressbook = 0;
|
||||
|
@ -116,7 +116,7 @@ var gAddressBookAbListener = {
|
|||
};
|
||||
|
||||
function OnUnloadAddressBook()
|
||||
{
|
||||
{
|
||||
var addrbookSession =
|
||||
Components.classes["@mozilla.org/addressbook/services/session;1"]
|
||||
.getService(Components.interfaces.nsIAddrBookSession);
|
||||
|
@ -177,7 +177,7 @@ function delayedOnLoadAddressBook()
|
|||
{
|
||||
gSearchInput = document.getElementById("searchInput");
|
||||
|
||||
verifyAccounts(null); // this will do migration, if we need to.
|
||||
verifyAccounts(null); // this will do migration, if we need to.
|
||||
|
||||
top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook);
|
||||
|
||||
|
@ -238,35 +238,35 @@ function OnLoadDirTree() {
|
|||
|
||||
function GetCurrentPrefs()
|
||||
{
|
||||
// prefs
|
||||
if ( cvPrefs == 0 )
|
||||
cvPrefs = new Object;
|
||||
// prefs
|
||||
if ( cvPrefs == 0 )
|
||||
cvPrefs = new Object;
|
||||
|
||||
cvPrefs.prefs = gPrefs;
|
||||
|
||||
// check "Show Name As" menu item based on pref
|
||||
var menuitemID;
|
||||
switch (gPrefs.getIntPref("mail.addr_book.lastnamefirst"))
|
||||
{
|
||||
case kFirstNameFirst:
|
||||
menuitemID = 'firstLastCmd';
|
||||
break;
|
||||
case kLastNameFirst:
|
||||
menuitemID = 'lastFirstCmd';
|
||||
break;
|
||||
case kDisplayName:
|
||||
default:
|
||||
menuitemID = 'displayNameCmd';
|
||||
break;
|
||||
}
|
||||
cvPrefs.prefs = gPrefs;
|
||||
|
||||
var menuitem = top.document.getElementById(menuitemID);
|
||||
if ( menuitem )
|
||||
menuitem.setAttribute('checked', 'true');
|
||||
// check "Show Name As" menu item based on pref
|
||||
var menuitemID;
|
||||
switch (gPrefs.getIntPref("mail.addr_book.lastnamefirst"))
|
||||
{
|
||||
case kFirstNameFirst:
|
||||
menuitemID = 'firstLastCmd';
|
||||
break;
|
||||
case kLastNameFirst:
|
||||
menuitemID = 'lastFirstCmd';
|
||||
break;
|
||||
case kDisplayName:
|
||||
default:
|
||||
menuitemID = 'displayNameCmd';
|
||||
break;
|
||||
}
|
||||
|
||||
// initialize phonetic
|
||||
var menuitem = top.document.getElementById(menuitemID);
|
||||
if ( menuitem )
|
||||
menuitem.setAttribute('checked', 'true');
|
||||
|
||||
// initialize phonetic
|
||||
var showPhoneticFields =
|
||||
gPrefs.getComplexValue("mail.addr_book.show_phonetic_fields",
|
||||
gPrefs.getComplexValue("mail.addr_book.show_phonetic_fields",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
// show phonetic fields if indicated by the pref
|
||||
if (showPhoneticFields == "true")
|
||||
|
@ -278,27 +278,27 @@ function GetCurrentPrefs()
|
|||
|
||||
function SetNameColumn(cmd)
|
||||
{
|
||||
var prefValue;
|
||||
|
||||
switch ( cmd )
|
||||
{
|
||||
case 'firstLastCmd':
|
||||
prefValue = kFirstNameFirst;
|
||||
break;
|
||||
case 'lastFirstCmd':
|
||||
prefValue = kLastNameFirst;
|
||||
break;
|
||||
case 'displayNameCmd':
|
||||
prefValue = kDisplayName;
|
||||
break;
|
||||
}
|
||||
|
||||
cvPrefs.prefs.setIntPref("mail.addr_book.lastnamefirst", prefValue);
|
||||
var prefValue;
|
||||
|
||||
switch ( cmd )
|
||||
{
|
||||
case 'firstLastCmd':
|
||||
prefValue = kFirstNameFirst;
|
||||
break;
|
||||
case 'lastFirstCmd':
|
||||
prefValue = kLastNameFirst;
|
||||
break;
|
||||
case 'displayNameCmd':
|
||||
prefValue = kDisplayName;
|
||||
break;
|
||||
}
|
||||
|
||||
cvPrefs.prefs.setIntPref("mail.addr_book.lastnamefirst", prefValue);
|
||||
}
|
||||
|
||||
function onFileMenuInit()
|
||||
{
|
||||
goUpdateCommand('cmd_printcard');
|
||||
goUpdateCommand('cmd_printcard');
|
||||
goUpdateCommand('cmd_printcardpreview');
|
||||
}
|
||||
|
||||
|
@ -322,13 +322,13 @@ function UpdateCardView()
|
|||
// either no cards, or more than one card is selected, clear the pane.
|
||||
if (cards.length == 1)
|
||||
OnClickedCard(cards[0])
|
||||
else
|
||||
else
|
||||
ClearCardViewPane();
|
||||
}
|
||||
|
||||
function OnClickedCard(card)
|
||||
{
|
||||
if (card)
|
||||
{
|
||||
if (card)
|
||||
DisplayCardViewPane(card);
|
||||
else
|
||||
ClearCardViewPane();
|
||||
|
@ -341,9 +341,9 @@ function AbClose()
|
|||
|
||||
function AbNewLDAPDirectory()
|
||||
{
|
||||
window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",
|
||||
"",
|
||||
"chrome,modal=yes,resizable=no,centerscreen",
|
||||
window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",
|
||||
"",
|
||||
"chrome,modal=yes,resizable=no,centerscreen",
|
||||
null);
|
||||
}
|
||||
|
||||
|
@ -355,14 +355,14 @@ function AbNewAddressBook()
|
|||
var dialogTitle = bundle.GetStringFromName('newAddressBookTitle');
|
||||
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, okCallback:AbOnCreateNewAddressBook});
|
||||
}
|
||||
|
||||
function AbRenameAddressBook()
|
||||
{
|
||||
var selectedABURI = GetSelectedDirectory();
|
||||
|
||||
|
||||
// the rdf service
|
||||
var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
|
@ -378,7 +378,7 @@ function AbRenameAddressBook()
|
|||
var canRename = (selectedABURI != kCollectedAddressbookURI && selectedABURI != kPersonalAddressbookURI);
|
||||
|
||||
var dialog = window.openDialog(
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"chrome://messenger/content/addressbook/abAddressBookNameDialog.xul",
|
||||
"", "chrome,modal=yes,resizable=no,centerscreen", {title: dialogTitle, canRename: canRename, name: selectedABDirectory.dirName,
|
||||
okCallback:AbOnRenameAddressBook});
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ function AbPrintCardInternal(doPrintPreview, msgType)
|
|||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
totalCard, selectionArray, statusFeedback,
|
||||
totalCard, selectionArray, statusFeedback,
|
||||
gPrintSettings, doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
|
@ -475,8 +475,8 @@ function AbPrintAddressBookInternal(doPrintPreview, msgType)
|
|||
return;
|
||||
|
||||
var statusFeedback;
|
||||
statusFeedback = Components.classes["@mozilla.org/messenger/statusfeedback;1"].createInstance();
|
||||
statusFeedback = statusFeedback.QueryInterface(Components.interfaces.nsIMsgStatusFeedback);
|
||||
statusFeedback = Components.classes["@mozilla.org/messenger/statusfeedback;1"].createInstance();
|
||||
statusFeedback = statusFeedback.QueryInterface(Components.interfaces.nsIMsgStatusFeedback);
|
||||
|
||||
/*
|
||||
turn "moz-abmdbdirectory://abook.mab" into
|
||||
|
@ -490,12 +490,12 @@ function AbPrintAddressBookInternal(doPrintPreview, msgType)
|
|||
gPrintSettings = PrintUtils.getPrintSettings();
|
||||
}
|
||||
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
1, [printUrl], statusFeedback, gPrintSettings, doPrintPreview, msgType);
|
||||
printEngineWindow = window.openDialog("chrome://messenger/content/msgPrintEngine.xul",
|
||||
"",
|
||||
"chrome,dialog=no,all",
|
||||
1, [printUrl], statusFeedback, gPrintSettings, doPrintPreview, msgType);
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
function AbPrintAddressBook()
|
||||
|
@ -513,7 +513,7 @@ function AbExport()
|
|||
try {
|
||||
var selectedABURI = GetSelectedDirectory();
|
||||
if (!selectedABURI) return;
|
||||
|
||||
|
||||
var directory = GetDirectoryFromURI(selectedABURI);
|
||||
addressbook.exportAddressBook(window, directory);
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ function AbExport()
|
|||
}
|
||||
|
||||
promptService.alert(window,
|
||||
gAddressBookBundle.getString("failedToExportTitle"),
|
||||
gAddressBookBundle.getString("failedToExportTitle"),
|
||||
message);
|
||||
}
|
||||
}
|
||||
|
@ -548,16 +548,16 @@ function AbDeleteDirectory()
|
|||
return;
|
||||
|
||||
var parentArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);
|
||||
if (!parentArray)
|
||||
return;
|
||||
if (!parentArray)
|
||||
return;
|
||||
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||
|
||||
|
||||
var parentRow = GetParentRow(dirTree, dirTree.currentIndex);
|
||||
var parentId = (parentRow == -1) ? "moz-abdirectory://" : dirTree.builderView.getResourceAtIndex(parentRow).Value;
|
||||
var parentDir = GetDirectoryFromURI(parentId);
|
||||
parentArray.AppendElement(parentDir);
|
||||
|
||||
|
||||
var directory = GetDirectoryFromURI(selectedABURI);
|
||||
var confirmDeleteMessage;
|
||||
var clearPrefsRequired = false;
|
||||
|
@ -619,12 +619,12 @@ function SetStatusText(total)
|
|||
{
|
||||
if (total == 1)
|
||||
statusText = gAddressBookBundle.getString("matchFound");
|
||||
else
|
||||
else
|
||||
statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]);
|
||||
}
|
||||
}
|
||||
else
|
||||
statusText = gAddressBookBundle.getFormattedString("totalCardStatus", [gAbView.directory.dirName, total]);
|
||||
statusText = gAddressBookBundle.getFormattedString("totalCardStatus", [gAbView.directory.dirName, total]);
|
||||
|
||||
gStatusText.setAttribute("label", statusText);
|
||||
}
|
||||
|
@ -655,17 +655,17 @@ function onAdvancedAbSearch()
|
|||
if (existingSearchWindow)
|
||||
existingSearchWindow.focus();
|
||||
else
|
||||
window.openDialog("chrome://messenger/content/ABSearchDialog.xul", "",
|
||||
"chrome,resizable,status,centerscreen,dialog=no",
|
||||
window.openDialog("chrome://messenger/content/ABSearchDialog.xul", "",
|
||||
"chrome,resizable,status,centerscreen,dialog=no",
|
||||
{directory: selectedABURI});
|
||||
}
|
||||
|
||||
function onEnterInSearchBar()
|
||||
{
|
||||
ClearCardViewPane();
|
||||
ClearCardViewPane();
|
||||
|
||||
if (!gQueryURIFormat)
|
||||
gQueryURIFormat = gPrefs.getComplexValue("mail.addr_book.quicksearchquery.format",
|
||||
gQueryURIFormat = gPrefs.getComplexValue("mail.addr_book.quicksearchquery.format",
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
|
||||
var searchURI = GetSelectedDirectory();
|
||||
|
@ -676,7 +676,7 @@ function onEnterInSearchBar()
|
|||
|
||||
/*
|
||||
XXX todo, handle the case where the LDAP url
|
||||
already has a query, like
|
||||
already has a query, like
|
||||
moz-abldapdirectory://nsdirectory.netscape.com:389/ou=People,dc=netscape,dc=com?(or(Department,=,Applications))
|
||||
*/
|
||||
if (gSearchInput.value != "") {
|
||||
|
@ -686,9 +686,9 @@ function onEnterInSearchBar()
|
|||
}
|
||||
|
||||
SetAbView(searchURI, gSearchInput.value != "", sortColumn, sortDirection);
|
||||
|
||||
// XXX todo
|
||||
// this works for synchronous searches of local addressbooks,
|
||||
|
||||
// XXX todo
|
||||
// this works for synchronous searches of local addressbooks,
|
||||
// but not for LDAP searches
|
||||
SelectFirstCard();
|
||||
}
|
||||
|
@ -713,9 +713,9 @@ function SwitchPaneFocus(event)
|
|||
if(cardViewBoxEmail1)
|
||||
cardViewBoxEmail1.focus();
|
||||
else
|
||||
cardViewBox.focus();
|
||||
cardViewBox.focus();
|
||||
}
|
||||
else
|
||||
else
|
||||
gAbResultsTree.focus();
|
||||
}
|
||||
else
|
||||
|
@ -727,7 +727,7 @@ function SwitchPaneFocus(event)
|
|||
if(cardViewBoxEmail1)
|
||||
cardViewBoxEmail1.focus();
|
||||
else
|
||||
cardViewBox.focus();
|
||||
cardViewBox.focus();
|
||||
}
|
||||
else if (focusedElement != dirTree && !IsDirPaneCollapsed())
|
||||
dirTree.focus();
|
||||
|
@ -743,7 +743,7 @@ function WhichPaneHasFocus()
|
|||
var cardViewBox = GetCardViewBox();
|
||||
var searchBox = document.getElementById('search-container');
|
||||
var dirTree = GetDirTree();
|
||||
|
||||
|
||||
var currentNode = top.document.commandDispatcher.focusedElement;
|
||||
while (currentNode)
|
||||
{
|
||||
|
|
|
@ -103,7 +103,7 @@ function awGetSelectItemIndex(itemData)
|
|||
selectElementIndexTable[aData] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return selectElementIndexTable[itemData];
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ function Recipients2CompFields(msgCompFields)
|
|||
case "addr_to" : addrTo += to_Sep + recipient; to_Sep = ","; break;
|
||||
case "addr_cc" : addrCc += cc_Sep + recipient; cc_Sep = ","; break;
|
||||
case "addr_bcc" : addrBcc += bcc_Sep + recipient; bcc_Sep = ","; break;
|
||||
case "addr_reply" : addrReply += reply_Sep + recipient; reply_Sep = ","; break;
|
||||
case "addr_reply" : addrReply += reply_Sep + recipient; reply_Sep = ","; break;
|
||||
case "addr_newsgroups" : addrNg += ng_Sep + fieldValue; ng_Sep = ","; break;
|
||||
case "addr_followup" : addrFollow += follow_Sep + fieldValue; follow_Sep = ","; break;
|
||||
// do CRLF, same as PUSH_NEWLINE() in nsMsgSend.h / nsMsgCompUtils.cpp
|
||||
|
@ -198,7 +198,7 @@ function CompFields2Recipients(msgCompFields)
|
|||
var templateNode = listbox.getElementsByTagName("listitem")[0];
|
||||
// dump("replacing child in comp fields 2 recips \n");
|
||||
listbox.parentNode.replaceChild(newListBoxNode, listbox);
|
||||
|
||||
|
||||
top.MAX_RECIPIENTS = 0;
|
||||
var msgReplyTo = msgCompFields.replyTo;
|
||||
var msgTo = msgCompFields.to;
|
||||
|
@ -208,10 +208,10 @@ function CompFields2Recipients(msgCompFields)
|
|||
var msgNewsgroups = msgCompFields.newsgroups;
|
||||
var msgFollowupTo = msgCompFields.followupTo;
|
||||
if(msgReplyTo)
|
||||
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgReplyTo, false),
|
||||
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgReplyTo, false),
|
||||
"addr_reply", newListBoxNode, templateNode);
|
||||
if(msgTo)
|
||||
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgTo, false),
|
||||
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgTo, false),
|
||||
"addr_to", newListBoxNode, templateNode);
|
||||
if(msgCC)
|
||||
awSetInputAndPopupFromArray(msgCompFields.SplitRecipients(msgCC, false),
|
||||
|
@ -232,7 +232,7 @@ function CompFields2Recipients(msgCompFields)
|
|||
awFitDummyRows(2);
|
||||
|
||||
// CompFields2Recipients is called whenever a user replies or edits an existing message. We want to
|
||||
// add all of the recipients for this message to the ignore list for spell check
|
||||
// add all of the recipients for this message to the ignore list for spell check
|
||||
addRecipientsToIgnoreList((gCurrentIdentity ? gCurrentIdentity.identityName + ', ' : '') + msgTo + ', ' + msgCC + ', ' + msgBCC);
|
||||
|
||||
gMimeHeaderParser = null; //Release the mime parser
|
||||
|
@ -344,25 +344,25 @@ function awAddRecipients(msgCompFields, recipientType, recipientsList)
|
|||
// this was broken out of awAddRecipients so it can be re-used...adds a new row matching recipientType and
|
||||
// drops in the single address.
|
||||
function awAddRecipient(recipientType, address)
|
||||
{
|
||||
{
|
||||
for (var row = 1; row <= top.MAX_RECIPIENTS; row ++)
|
||||
{
|
||||
if (awGetInputElement(row).value == "")
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (row > top.MAX_RECIPIENTS)
|
||||
awAppendNewRow(false);
|
||||
|
||||
awSetInputAndPopupValue(awGetInputElement(row), address, awGetPopupElement(row), recipientType, row);
|
||||
|
||||
|
||||
/* be sure we still have an empty row left at the end */
|
||||
if (row == top.MAX_RECIPIENTS)
|
||||
{
|
||||
awAppendNewRow(true);
|
||||
awSetInputAndPopupValue(awGetInputElement(top.MAX_RECIPIENTS), "", awGetPopupElement(top.MAX_RECIPIENTS), "addr_to", top.MAX_RECIPIENTS);
|
||||
}
|
||||
|
||||
|
||||
// add the recipient to our spell check ignore list
|
||||
addRecipientsToIgnoreList(address);
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ function awTestRowSequence()
|
|||
function awResetAllRows()
|
||||
{
|
||||
var maxRecipients = top.MAX_RECIPIENTS;
|
||||
|
||||
|
||||
for (var row = 1; row <= maxRecipients ; row ++)
|
||||
{
|
||||
awGetInputElement(row).value = "";
|
||||
|
@ -552,14 +552,14 @@ function awAppendNewRow(setFocus)
|
|||
{
|
||||
input[0].setAttribute("value", "");
|
||||
input[0].setAttribute("id", "addressCol2#" + top.MAX_RECIPIENTS);
|
||||
|
||||
//this copies the autocomplete sessions list from recipient#1
|
||||
|
||||
//this copies the autocomplete sessions list from recipient#1
|
||||
input[0].syncSessions(document.getElementById('addressCol2#1'));
|
||||
|
||||
// also clone the showCommentColumn setting
|
||||
//
|
||||
input[0].showCommentColumn =
|
||||
document.getElementById("addressCol2#1").showCommentColumn;
|
||||
// also clone the showCommentColumn setting
|
||||
//
|
||||
input[0].showCommentColumn =
|
||||
document.getElementById("addressCol2#1").showCommentColumn;
|
||||
|
||||
// We always clone the first row. The problem is that the first row
|
||||
// could be focused. When we clone that row, we end up with a cloned
|
||||
|
@ -576,7 +576,7 @@ function awAppendNewRow(setFocus)
|
|||
var select = newNode.getElementsByTagName(awSelectElementName());
|
||||
if ( select && select.length == 1 )
|
||||
{
|
||||
// It only makes sense to clone some field types; others
|
||||
// It only makes sense to clone some field types; others
|
||||
// should not be cloned, since it just makes the user have
|
||||
// to go to the trouble of selecting something else. In such
|
||||
// cases let's default to 'To' (a reasonable default since
|
||||
|
@ -587,7 +587,7 @@ function awAppendNewRow(setFocus)
|
|||
case "addr_reply":
|
||||
case "addr_other":
|
||||
select[0].selectedIndex = awGetSelectItemIndex("addr_to");
|
||||
break;
|
||||
break;
|
||||
case "addr_followup":
|
||||
select[0].selectedIndex = awGetSelectItemIndex("addr_newsgroups");
|
||||
break;
|
||||
|
@ -595,7 +595,7 @@ function awAppendNewRow(setFocus)
|
|||
// e.g. "addr_to","addr_cc","addr_bcc","addr_newsgroups":
|
||||
select[0].selectedIndex = awGetSelectItemIndex(lastRecipientType);
|
||||
}
|
||||
|
||||
|
||||
select[0].setAttribute("id", "addressCol1#" + top.MAX_RECIPIENTS);
|
||||
if (input)
|
||||
_awSetAutoComplete(select[0], input[0]);
|
||||
|
@ -762,7 +762,7 @@ function DragOverAddressingWidget(event)
|
|||
var validFlavor = false;
|
||||
var dragSession = dragSession = gDragService.getCurrentSession();
|
||||
|
||||
if (dragSession.isDataFlavorSupported("text/x-moz-address"))
|
||||
if (dragSession.isDataFlavorSupported("text/x-moz-address"))
|
||||
validFlavor = true;
|
||||
|
||||
if (validFlavor)
|
||||
|
@ -772,7 +772,7 @@ function DragOverAddressingWidget(event)
|
|||
function DropOnAddressingWidget(event)
|
||||
{
|
||||
var dragSession = gDragService.getCurrentSession();
|
||||
|
||||
|
||||
var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
|
||||
trans.addDataFlavor("text/x-moz-address");
|
||||
|
||||
|
@ -783,9 +783,9 @@ function DropOnAddressingWidget(event)
|
|||
var bestFlavor = new Object();
|
||||
var len = new Object();
|
||||
trans.getAnyTransferData ( bestFlavor, dataObj, len );
|
||||
if ( dataObj )
|
||||
if ( dataObj )
|
||||
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
|
||||
if ( !dataObj )
|
||||
if ( !dataObj )
|
||||
continue;
|
||||
|
||||
// pull the address out of the data object
|
||||
|
@ -824,7 +824,7 @@ function awRecipientTextCommand(userAction, element)
|
|||
// Called when an autocomplete session item is selected and the status of
|
||||
// the session it was selected from is nsIAutoCompleteStatus::failureItems.
|
||||
//
|
||||
// As of this writing, the only way that can happen is when an LDAP
|
||||
// As of this writing, the only way that can happen is when an LDAP
|
||||
// autocomplete session returns an error to be displayed to the user.
|
||||
//
|
||||
// There are hardcoded messages in here, but these are just fallbacks for
|
||||
|
@ -832,37 +832,37 @@ function awRecipientTextCommand(userAction, element)
|
|||
//
|
||||
function awRecipientErrorCommand(errItem, element)
|
||||
{
|
||||
// remove the angle brackets from the general error message to construct
|
||||
// remove the angle brackets from the general error message to construct
|
||||
// the title for the alert. someday we'll pass this info using a real
|
||||
// exception object, and then this code can go away.
|
||||
//
|
||||
var generalErrString;
|
||||
if (errItem.value != "")
|
||||
if (errItem.value != "")
|
||||
generalErrString = errItem.value.slice(1, errItem.value.length-1);
|
||||
else
|
||||
generalErrString = "Unknown LDAP server problem encountered";
|
||||
else
|
||||
generalErrString = "Unknown LDAP server problem encountered";
|
||||
|
||||
// try and get the string of the specific error to contruct the complete
|
||||
// err msg, otherwise fall back to something generic. This message is
|
||||
// handed to us as an nsISupportsString in the param slot of the
|
||||
// autocomplete error item, by agreement documented in
|
||||
// handed to us as an nsISupportsString in the param slot of the
|
||||
// autocomplete error item, by agreement documented in
|
||||
// nsILDAPAutoCompFormatter.idl
|
||||
//
|
||||
var specificErrString = "";
|
||||
try
|
||||
try
|
||||
{
|
||||
var specificError = errItem.param.QueryInterface(Components.interfaces.nsISupportsString);
|
||||
specificErrString = specificError.data;
|
||||
} catch (ex)
|
||||
specificErrString = specificError.data;
|
||||
} catch (ex)
|
||||
{}
|
||||
|
||||
if (specificErrString == "")
|
||||
specificErrString = "Internal error";
|
||||
|
||||
if (gPromptService)
|
||||
if (specificErrString == "")
|
||||
specificErrString = "Internal error";
|
||||
|
||||
if (gPromptService)
|
||||
gPromptService.alert(window, generalErrString, specificErrString);
|
||||
else
|
||||
window.alert(generalErrString + ": " + specificErrString);
|
||||
else
|
||||
window.alert(generalErrString + ": " + specificErrString);
|
||||
}
|
||||
|
||||
function awRecipientKeyPress(event, element)
|
||||
|
@ -876,7 +876,7 @@ function awRecipientKeyPress(event, element)
|
|||
break;
|
||||
case KeyEvent.DOM_VK_RETURN:
|
||||
case KeyEvent.DOM_VK_TAB:
|
||||
// if the user text contains a comma or a line return, ignore
|
||||
// if the user text contains a comma or a line return, ignore
|
||||
if (element.value.search(',') != -1)
|
||||
{
|
||||
var addresses = element.value;
|
||||
|
@ -885,7 +885,7 @@ function awRecipientKeyPress(event, element)
|
|||
}
|
||||
else if (event.keyCode == KeyEvent.DOM_VK_TAB)
|
||||
awTabFromRecipient(element, event);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1066,8 +1066,8 @@ function awDocumentKeyPress(event)
|
|||
|
||||
function awRecipientInputCommand(event, inputElement)
|
||||
{
|
||||
gContentChanged=true;
|
||||
setupAutocomplete();
|
||||
gContentChanged=true;
|
||||
setupAutocomplete();
|
||||
}
|
||||
|
||||
// Given an arbitrary block of text like a comma delimited list of names or a names separated by spaces,
|
||||
|
@ -1103,8 +1103,8 @@ function AutomatedAutoCompleteHandler()
|
|||
{
|
||||
}
|
||||
|
||||
// state driven self contained object which will autocomplete a block of addresses without any UI.
|
||||
// force picks the first match and adds it to the addressing widget, then goes on to the next
|
||||
// state driven self contained object which will autocomplete a block of addresses without any UI.
|
||||
// force picks the first match and adds it to the addressing widget, then goes on to the next
|
||||
// name to complete.
|
||||
|
||||
AutomatedAutoCompleteHandler.prototype =
|
||||
|
@ -1144,7 +1144,7 @@ AutomatedAutoCompleteHandler.prototype =
|
|||
if (this.namesToComplete[this.indexIntoNames].search('@') == -1) // don't autocomplete if address has an @ sign in it
|
||||
{
|
||||
// make sure total session count is updated before we kick off ANY actual searches
|
||||
if (gAutocompleteSession)
|
||||
if (gAutocompleteSession)
|
||||
this.numSessionsToSearch++;
|
||||
|
||||
if (gLDAPSession && gCurrentAutocompleteDirectory)
|
||||
|
@ -1174,17 +1174,17 @@ AutomatedAutoCompleteHandler.prototype =
|
|||
}
|
||||
},
|
||||
|
||||
onStatus:function(aStatus)
|
||||
onStatus:function(aStatus)
|
||||
{
|
||||
return;
|
||||
},
|
||||
|
||||
onAutoComplete: function(aResults, aStatus)
|
||||
|
||||
onAutoComplete: function(aResults, aStatus)
|
||||
{
|
||||
// store the results until all sessions are done and have reported in
|
||||
if (aResults)
|
||||
this.searchResults[this.numSessionsSearched] = aResults;
|
||||
|
||||
|
||||
this.numSessionsSearched++; // bump our counter
|
||||
|
||||
if (this.numSessionsToSearch <= this.numSessionsSearched)
|
||||
|
@ -1197,7 +1197,7 @@ AutomatedAutoCompleteHandler.prototype =
|
|||
var addressToAdd;
|
||||
|
||||
// loop through the results looking for the non default case (default case is the address book with only one match, the default domain)
|
||||
var sessionIndex;
|
||||
var sessionIndex;
|
||||
|
||||
var searchResultsForSession;
|
||||
|
||||
|
@ -1230,8 +1230,8 @@ AutomatedAutoCompleteHandler.prototype =
|
|||
addressToAdd = this.namesToComplete[this.indexIntoNames];
|
||||
|
||||
// that will automatically set the focus on a new available row, and make sure it is visible
|
||||
awAddRecipient(this.recipientType ? this.recipientType : "addr_to", addressToAdd);
|
||||
|
||||
awAddRecipient(this.recipientType ? this.recipientType : "addr_to", addressToAdd);
|
||||
|
||||
this.indexIntoNames++;
|
||||
this.autoCompleteNextAddress();
|
||||
},
|
||||
|
|
|
@ -54,30 +54,30 @@ var MigrationWizard = {
|
|||
os.addObserver(this, "Migration:ItemAfterMigrate", false);
|
||||
os.addObserver(this, "Migration:Ended", false);
|
||||
os.addObserver(this, "Migration:Progress", false);
|
||||
|
||||
|
||||
this._wiz = document.documentElement;
|
||||
|
||||
if ("arguments" in window) {
|
||||
this._source = window.arguments[0];
|
||||
this._migrator = window.arguments[1] ? window.arguments[1].QueryInterface(kIMig) : null;
|
||||
this._autoMigrate = window.arguments[2].QueryInterface(kIPStartup);
|
||||
|
||||
|
||||
// Show the "nothing" option in the automigrate case to provide an
|
||||
// easily identifiable way to avoid migration and create a new profile.
|
||||
var nothing = document.getElementById("nothing");
|
||||
nothing.hidden = false;
|
||||
nothing.hidden = false;
|
||||
}
|
||||
|
||||
|
||||
this.onImportSourcePageShow();
|
||||
|
||||
|
||||
// Behavior alert! If we were given a migrator already, then we are going to perform migration
|
||||
// with that migrator, skip the wizard screen where we show all of the migration sources and
|
||||
// with that migrator, skip the wizard screen where we show all of the migration sources and
|
||||
// jump right into migration.
|
||||
if (this._migrator)
|
||||
{
|
||||
if (this._migrator.sourceHasMultipleProfiles)
|
||||
this._wiz.goTo("selectProfile");
|
||||
else
|
||||
else
|
||||
{
|
||||
var sourceProfiles = this._migrator.sourceProfiles;
|
||||
var profileName = sourceProfiles.QueryElementAt(0, Components.interfaces.nsISupportsString);
|
||||
|
@ -86,7 +86,7 @@ var MigrationWizard = {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
uninit: function ()
|
||||
{
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
||||
|
@ -96,12 +96,12 @@ var MigrationWizard = {
|
|||
os.removeObserver(this, "Migration:Ended");
|
||||
os.removeObserver(this, "Migration:Progress");
|
||||
},
|
||||
|
||||
|
||||
// 1 - Import Source
|
||||
onImportSourcePageShow: function ()
|
||||
{
|
||||
this._wiz.canRewind = false;
|
||||
|
||||
|
||||
// Figure out what source apps are are available to import from:
|
||||
var group = document.getElementById("importSourceGroup");
|
||||
for (var i = 0; i < group.childNodes.length; ++i) {
|
||||
|
@ -115,26 +115,26 @@ var MigrationWizard = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var firstNonDisabled = null;
|
||||
for (var i = 0; i < group.childNodes.length; ++i) {
|
||||
if (!group.childNodes[i].hidden) {
|
||||
if (!group.childNodes[i].hidden) {
|
||||
firstNonDisabled = group.childNodes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
group.selectedItem = this._source == "" ? firstNonDisabled : document.getElementById(this._source);
|
||||
},
|
||||
|
||||
|
||||
onImportSourcePageAdvanced: function ()
|
||||
{
|
||||
var newSource = document.getElementById("importSourceGroup").selectedItem.id;
|
||||
|
||||
|
||||
if (newSource == "nothing") {
|
||||
document.documentElement.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!this._migrator || (newSource != this._source)) {
|
||||
// Create the migrator for the selected source.
|
||||
var contractID = kProfileMigratorContractIDPrefix + newSource;
|
||||
|
@ -143,9 +143,9 @@ var MigrationWizard = {
|
|||
this._itemsFlags = kIMig.ALL;
|
||||
this._selectedProfile = null;
|
||||
}
|
||||
|
||||
|
||||
this._source = newSource;
|
||||
|
||||
|
||||
// check for more than one source profile
|
||||
if (this._migrator.sourceHasMultipleProfiles)
|
||||
this._wiz.currentPage.next = "selectProfile";
|
||||
|
@ -160,7 +160,7 @@ var MigrationWizard = {
|
|||
this._selectedProfile = "";
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 2 - [Profile Selection]
|
||||
onSelectProfilePageShow: function ()
|
||||
{
|
||||
|
@ -168,11 +168,11 @@ var MigrationWizard = {
|
|||
// too and don't want to disable the back button
|
||||
// if (this._autoMigrate)
|
||||
// document.documentElement.getButton("back").disabled = true;
|
||||
|
||||
|
||||
var profiles = document.getElementById("profiles");
|
||||
while (profiles.hasChildNodes())
|
||||
while (profiles.hasChildNodes())
|
||||
profiles.removeChild(profiles.firstChild);
|
||||
|
||||
|
||||
var sourceProfiles = this._migrator.sourceProfiles;
|
||||
var count = sourceProfiles.Count();
|
||||
for (var i = 0; i < count; ++i) {
|
||||
|
@ -182,35 +182,35 @@ var MigrationWizard = {
|
|||
item.setAttribute("label", str.data);
|
||||
profiles.appendChild(item);
|
||||
}
|
||||
|
||||
|
||||
profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile) : profiles.firstChild;
|
||||
},
|
||||
|
||||
|
||||
onSelectProfilePageRewound: function ()
|
||||
{
|
||||
var profiles = document.getElementById("profiles");
|
||||
this._selectedProfile = profiles.selectedItem.id;
|
||||
},
|
||||
|
||||
|
||||
onSelectProfilePageAdvanced: function ()
|
||||
{
|
||||
var profiles = document.getElementById("profiles");
|
||||
this._selectedProfile = profiles.selectedItem.id;
|
||||
|
||||
|
||||
// If we're automigrating, don't show the item selection page, just grab everything.
|
||||
if (this._autoMigrate)
|
||||
this._wiz.currentPage.next = "migrating";
|
||||
},
|
||||
|
||||
|
||||
// 3 - ImportItems
|
||||
onImportItemsPageShow: function ()
|
||||
{
|
||||
var dataSources = document.getElementById("dataSources");
|
||||
while (dataSources.hasChildNodes())
|
||||
dataSources.removeChild(dataSources.firstChild);
|
||||
|
||||
|
||||
var bundle = document.getElementById("bundle");
|
||||
|
||||
|
||||
var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
|
||||
for (var i = 0; i < 16; ++i) {
|
||||
var itemID = (items >> i) & 0x1 ? Math.pow(2, i) : 0;
|
||||
|
@ -235,7 +235,7 @@ var MigrationWizard = {
|
|||
this._itemsFlags |= parseInt(checkbox.id);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onImportItemCommand: function (aEvent)
|
||||
{
|
||||
var items = document.getElementById("dataSources");
|
||||
|
@ -251,14 +251,14 @@ var MigrationWizard = {
|
|||
|
||||
this._wiz.canAdvance = oneChecked;
|
||||
},
|
||||
|
||||
|
||||
// 4 - Migrating
|
||||
onMigratingPageShow: function ()
|
||||
{
|
||||
this._wiz.getButton("cancel").disabled = true;
|
||||
this._wiz.canRewind = false;
|
||||
this._wiz.canAdvance = false;
|
||||
|
||||
|
||||
// When automigrating, show all of the data that can be received from this source.
|
||||
if (this._autoMigrate)
|
||||
this._itemsFlags = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
|
||||
|
@ -266,18 +266,18 @@ var MigrationWizard = {
|
|||
this._listItems("migratingItems");
|
||||
setTimeout(this.onMigratingMigrate, 0, this);
|
||||
},
|
||||
|
||||
|
||||
onMigratingMigrate: function (aOuter)
|
||||
{
|
||||
aOuter._migrator.migrate(aOuter._itemsFlags, aOuter._autoMigrate, aOuter._selectedProfile);
|
||||
},
|
||||
|
||||
|
||||
_listItems: function (aID)
|
||||
{
|
||||
var items = document.getElementById(aID);
|
||||
while (items.hasChildNodes())
|
||||
items.removeChild(items.firstChild);
|
||||
|
||||
|
||||
var bundle = document.getElementById("bundle");
|
||||
var itemID;
|
||||
for (var i = 0; i < 16; ++i) {
|
||||
|
@ -291,13 +291,13 @@ var MigrationWizard = {
|
|||
}
|
||||
catch (e) {
|
||||
// if the block above throws, we've enumerated all the import data types we
|
||||
// currently support and are now just wasting time, break.
|
||||
// currently support and are now just wasting time, break.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
observe: function (aSubject, aTopic, aData)
|
||||
{
|
||||
switch (aTopic) {
|
||||
|
@ -335,7 +335,7 @@ var MigrationWizard = {
|
|||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onDonePageShow: function ()
|
||||
{
|
||||
this._wiz.getButton("cancel").disabled = true;
|
||||
|
|
|
@ -70,3 +70,10 @@ function PROT_Application() {
|
|||
PROT_Application.prototype.getReportPhishingURL = function() {
|
||||
return gDataProvider.getReportPhishURL();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String the report error URL (localized).
|
||||
*/
|
||||
PROT_Application.prototype.getReportErrorURL = function() {
|
||||
return gDataProvider.getReportErrorURL();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<overlay id="AdvancedPaneOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
||||
<prefpane id="paneAdvanced" onpaneload="gAdvancedPane.init();"
|
||||
xmlns:xhtml2="http://www.w3.org/TR/xhtml2"
|
||||
xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#"
|
||||
|
@ -64,7 +64,7 @@
|
|||
<preference id="mailnews.reuse_message_window" name="mailnews.reuse_message_window" type="bool"/>
|
||||
<preference id="mailnews.tcptimeout" name="mailnews.tcptimeout" type="int"/>
|
||||
<preference id="mail.prompt_purge_threshhold" name="mail.prompt_purge_threshhold" type="bool"/>
|
||||
<preference id="mail.purge_threshhold" name="mail.purge_threshhold" type="int"/>
|
||||
<preference id="mail.purge_threshhold" name="mail.purge_threshhold" type="int"/>
|
||||
<preference id="app.update.enabled" name="app.update.enabled" type="bool"
|
||||
onchange="gAdvancedPane.updateAppUpdateItems();
|
||||
gAdvancedPane.updateAutoItems();
|
||||
|
@ -86,7 +86,7 @@
|
|||
type="bool"/>
|
||||
<preference id="security.disable_button.openDeviceManager"
|
||||
name="security.disable_button.openDeviceManager"
|
||||
type="bool"/>
|
||||
type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<tabbox id="advancedPrefs" flex="1" onselect="gAdvancedPane.tabSelectionChanged();">
|
||||
|
@ -96,15 +96,15 @@
|
|||
<tab label="&itemUpdate.label;"/>
|
||||
<tab label="&itemCertificates.label;"/>
|
||||
</tabs>
|
||||
|
||||
|
||||
<tabpanels flex="1">
|
||||
<!-- General -->
|
||||
<!-- General -->
|
||||
<tabpanel orient="vertical">
|
||||
<hbox align="center" pack="start">
|
||||
<checkbox id="showCondensedAddresses" label="&showCondensedAddresses.label;"
|
||||
<checkbox id="showCondensedAddresses" label="&showCondensedAddresses.label;"
|
||||
accesskey="&showCondensedAddresses.accesskey;" preference="mail.showCondensedAddresses"/>
|
||||
</hbox>
|
||||
|
||||
</hbox>
|
||||
|
||||
<hbox align="center" pack="start">
|
||||
<checkbox id="markAsRead" label="&markAsRead.label;" accesskey="&markAsRead.accesskey;"
|
||||
preference="mailnews.mark_message_read.delay"
|
||||
|
@ -120,25 +120,25 @@
|
|||
</hbox>
|
||||
|
||||
<hbox align="center" pack="start">
|
||||
<checkbox id="showFolderPaneColumns" label="&showFolderColumns.label;"
|
||||
<checkbox id="showFolderPaneColumns" label="&showFolderColumns.label;"
|
||||
accesskey="&showFolderColumns.accesskey;" preference="mail.showFolderPaneColumns"/>
|
||||
</hbox>
|
||||
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<vbox>
|
||||
<hbox align="center" pack="start">
|
||||
<label value="&openMsgIn.label;"/>
|
||||
</hbox>
|
||||
|
||||
<hbox class="indent">
|
||||
|
||||
<hbox class="indent">
|
||||
<radiogroup id="mailnewsDoubleClick2NewWindow" preference="mailnews.reuse_message_window" orient="horizontal">
|
||||
<radio value="false" label="&reuseExpRadio0.label;" accesskey="&reuseExpRadio0.accesskey;" id="new"/>
|
||||
<radio value="true" label="&reuseExpRadio1.label;" accesskey="&reuseExpRadio1.accesskey;" id="existing"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
|
||||
<separator class="thin"/>
|
||||
|
||||
<hbox align="center">
|
||||
|
@ -150,10 +150,10 @@
|
|||
|
||||
<hbox align="center" pack="start">
|
||||
<description flex="1">&configEditDesc.label;</description>
|
||||
<button id="configEditor" label="&configEdit.label;"
|
||||
<button id="configEditor" label="&configEdit.label;"
|
||||
accesskey="&configEdit.accesskey;" oncommand="gAdvancedPane.showConfigEdit();"/>
|
||||
</hbox>
|
||||
|
||||
|
||||
</tabpanel>
|
||||
|
||||
<tabpanel orient="vertical">
|
||||
|
@ -162,8 +162,8 @@
|
|||
<caption label="&connectionsInfo.caption;"/>
|
||||
<hbox align="center">
|
||||
<description flex="1" control="catProxiesButton">&proxiesInfo.label;</description>
|
||||
<button id="catProxiesButton" label="&showConnections.label;"
|
||||
accesskey="&showConnections.accesskey;"
|
||||
<button id="catProxiesButton" label="&showConnections.label;"
|
||||
accesskey="&showConnections.accesskey;"
|
||||
oncommand="gAdvancedPane.showConnections();"/>
|
||||
</hbox>
|
||||
|
||||
|
@ -171,31 +171,31 @@
|
|||
<label value="&connectionTimeout.label;" accesskey="&connectionTimeout.accesskey;" control="connectionTimeoutBox" />
|
||||
<textbox id="connectionTimeoutBox" size="3" preference="mailnews.tcptimeout"/>
|
||||
<label value="&connectionSeconds.label;"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<groupbox>
|
||||
<caption label="&offlineInfo.caption;"/>
|
||||
<hbox align="center">
|
||||
<description flex="1" control="offlineSettingsButton">&offlineInfo.label;</description>
|
||||
<button id="offlineSettingsButton" label="&showOffline.label;"
|
||||
accesskey="&showOffline.accesskey;"
|
||||
<button id="offlineSettingsButton" label="&showOffline.label;"
|
||||
accesskey="&showOffline.accesskey;"
|
||||
oncommand="gAdvancedPane.showOffline();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
|
||||
<groupbox>
|
||||
<caption label="&Diskspace;"/>
|
||||
<caption label="&Diskspace;"/>
|
||||
<hbox align="center">
|
||||
<checkbox id="offlineCompactFolder" label="&offlineCompact.label;" accesskey="&offlineCompact.accesskey;"
|
||||
preference="mail.prompt_purge_threshhold"/>
|
||||
preference="mail.prompt_purge_threshhold"/>
|
||||
<textbox id="offlineCompactFolderMin" size="5" value="100" preference="mail.purge_threshhold"/>
|
||||
<label value="&kb.label;"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</tabpanel>
|
||||
|
||||
<!-- Update -->
|
||||
|
||||
<!-- Update -->
|
||||
|
||||
<tabpanel orient="vertical" align="start">
|
||||
<label>&autoCheck.label;</label>
|
||||
|
@ -222,7 +222,7 @@
|
|||
label="&modeAutomatic.label;"
|
||||
accesskey="&modeAutomatic.accesskey;"/>
|
||||
<hbox class="indent">
|
||||
<checkbox id="warnIncompatible"
|
||||
<checkbox id="warnIncompatible"
|
||||
label="&modeAutoAddonWarn.label;" accesskey="&modeAutoAddonWarn.accesskey;"
|
||||
preference="app.update.mode"
|
||||
onsyncfrompreference="return gAdvancedPane.addonWarnSyncFrom();"
|
||||
|
@ -231,31 +231,31 @@
|
|||
</radiogroup>
|
||||
<separator/>
|
||||
<hbox>
|
||||
<button id="showUpdateHistory"
|
||||
<button id="showUpdateHistory"
|
||||
label="&showUpdates.label;" accesskey="&showUpdates.accesskey;"
|
||||
preference="app.update.disable_button.showUpdateHistory"
|
||||
oncommand="gAdvancedPane.showUpdates();"/>
|
||||
</hbox>
|
||||
</tabpanel>
|
||||
|
||||
|
||||
<!-- Certificates -->
|
||||
<tabpanel orient="vertical">
|
||||
<description>&certificatesInfo.label;</description>
|
||||
<separator class="thin"/>
|
||||
<description class="indent">
|
||||
<button label="&viewCertificates.label;" accesskey="&viewCertificates.accesskey;"
|
||||
<button label="&viewCertificates.label;" accesskey="&viewCertificates.accesskey;"
|
||||
oncommand="gAdvancedPane.showCertificates();"
|
||||
preference="security.disable_button.openCertManager"/>
|
||||
<button label="&viewCRLs.label;" accesskey="&viewCRLs.accesskey;"
|
||||
<button label="&viewCRLs.label;" accesskey="&viewCRLs.accesskey;"
|
||||
oncommand="gAdvancedPane.showCRLs();"
|
||||
preference="security.OCSP.disable_button.managecrl"/>
|
||||
<button label="&viewOCSP.label;" accesskey="&viewOCSP.accesskey;"
|
||||
<button label="&viewOCSP.label;" accesskey="&viewOCSP.accesskey;"
|
||||
oncommand="gAdvancedPane.showOCSP();"/>
|
||||
<button label="&viewSecurityDevices.label;" accesskey="&viewSecurityDevices.accesskey;"
|
||||
<button label="&viewSecurityDevices.label;" accesskey="&viewSecurityDevices.accesskey;"
|
||||
oncommand="gAdvancedPane.showSecurityDevices();"
|
||||
preference="security.disable_button.openDeviceManager"/>
|
||||
</description>
|
||||
</tabpanel>
|
||||
</tabpanel>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
<separator/>
|
||||
|
|
|
@ -43,13 +43,13 @@ var gPrivacyPane = {
|
|||
init: function ()
|
||||
{
|
||||
this.mPane = document.getElementById("panePrivacy");
|
||||
|
||||
|
||||
this.updateManualMarkMode(document.getElementById('manualMark').checked);
|
||||
this.updateJunkLogButton(document.getElementById('enableJunkLogging').checked);
|
||||
|
||||
|
||||
// Update the MP buttons
|
||||
this.updateMasterPasswordButton();
|
||||
|
||||
|
||||
// update the checkbox for downloading phishing url tables
|
||||
// this.updateDownloadedPhishingListState();
|
||||
|
||||
|
@ -70,18 +70,18 @@ var gPrivacyPane = {
|
|||
{
|
||||
document.getElementById('manualMarkMode').disabled = !aEnableRadioGroup;
|
||||
},
|
||||
|
||||
|
||||
updateJunkLogButton: function(aEnableButton)
|
||||
{
|
||||
document.getElementById('openJunkLogButton').disabled = !aEnableButton;
|
||||
},
|
||||
|
||||
|
||||
openJunkLog: function()
|
||||
{
|
||||
document.documentElement.openWindow("mailnews:junklog", "chrome://messenger/content/preferences/junkLog.xul",
|
||||
"", null);
|
||||
"", null);
|
||||
},
|
||||
|
||||
|
||||
resetTrainingData: function()
|
||||
{
|
||||
// make sure the user really wants to do this
|
||||
|
@ -97,10 +97,10 @@ var gPrivacyPane = {
|
|||
|
||||
// otherwise go ahead and remove the training data
|
||||
var junkmailPlugin = Components.classes["@mozilla.org/messenger/filter-plugin;1?name=bayesianfilter"]
|
||||
.getService(Components.interfaces.nsIJunkMailPlugin);
|
||||
.getService(Components.interfaces.nsIJunkMailPlugin);
|
||||
|
||||
if (junkmailPlugin)
|
||||
junkmailPlugin.resetTrainingData();
|
||||
junkmailPlugin.resetTrainingData();
|
||||
},
|
||||
|
||||
initReencryptCallback: function()
|
||||
|
@ -122,7 +122,7 @@ var gPrivacyPane = {
|
|||
"", null);
|
||||
this.updateMasterPasswordButton();
|
||||
},
|
||||
|
||||
|
||||
updateMasterPasswordButton: function ()
|
||||
{
|
||||
// See if there's a master password and set the button label accordingly
|
||||
|
@ -132,13 +132,13 @@ var gPrivacyPane = {
|
|||
if (slot) {
|
||||
const nsIPKCS11Slot = Components.interfaces.nsIPKCS11Slot;
|
||||
var status = slot.status;
|
||||
var noMP = status == nsIPKCS11Slot.SLOT_UNINITIALIZED ||
|
||||
var noMP = status == nsIPKCS11Slot.SLOT_UNINITIALIZED ||
|
||||
status == nsIPKCS11Slot.SLOT_READY;
|
||||
|
||||
var bundle = document.getElementById("bundlePreferences");
|
||||
document.getElementById("setMasterPassword").label =
|
||||
bundle.getString(noMP ? "setMasterPassword" : "changeMasterPassword");
|
||||
|
||||
|
||||
document.getElementById("removeMasterPassword").disabled = noMP;
|
||||
}
|
||||
},
|
||||
|
@ -146,15 +146,15 @@ var gPrivacyPane = {
|
|||
removeMasterPassword: function ()
|
||||
{
|
||||
var secmodDB = Components.classes["@mozilla.org/security/pkcs11moduledb;1"]
|
||||
.getService(Components.interfaces.nsIPKCS11ModuleDB);
|
||||
if (secmodDB.isFIPSEnabled)
|
||||
.getService(Components.interfaces.nsIPKCS11ModuleDB);
|
||||
if (secmodDB.isFIPSEnabled)
|
||||
{
|
||||
var bundle = document.getElementById("bundlePreferences");
|
||||
promptService.alert(window,
|
||||
bundle.getString("pw_change_failed_title"),
|
||||
bundle.getString("pw_change2empty_in_fips_mode"));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://mozapps/content/preferences/removemp.xul",
|
||||
"", null);
|
||||
|
|
|
@ -98,14 +98,14 @@ const LOCAL_CONTENT_TEMPLATE = "\n\
|
|||
// no local style overrides at this time
|
||||
const LOCAL_STYLE = "\n";
|
||||
|
||||
function FeedItem()
|
||||
function FeedItem()
|
||||
{
|
||||
this.mDate = new Date().toString();
|
||||
this.mUnicodeConverter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
|
||||
}
|
||||
|
||||
FeedItem.prototype =
|
||||
FeedItem.prototype =
|
||||
{
|
||||
isStoredWithId: false, // we currently only do this for IETF Atom. RSS2 with GUIDs should do this as well.
|
||||
xmlContentBase: null, // only for IETF Atom
|
||||
|
@ -177,26 +177,26 @@ FeedItem.prototype =
|
|||
return this.mURL;
|
||||
},
|
||||
|
||||
store: function()
|
||||
store: function()
|
||||
{
|
||||
this.mUnicodeConverter.charset = this.characterSet;
|
||||
|
||||
if (this.isStored())
|
||||
if (this.isStored())
|
||||
debug(this.identity + " already stored; ignoring");
|
||||
else if (this.content)
|
||||
else if (this.content)
|
||||
{
|
||||
debug(this.identity + " has content; storing");
|
||||
var content = MESSAGE_TEMPLATE;
|
||||
content = content.replace(/%CONTENT_TEMPLATE%/, LOCAL_CONTENT_TEMPLATE);
|
||||
content = content.replace(/%STYLE%/, LOCAL_STYLE);
|
||||
content = content.replace(/%TITLE%/, this.title);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%URL%/g, this.mURL);
|
||||
content = content.replace(/%CONTENT%/, this.content);
|
||||
this.content = content; // XXX store it elsewhere, f.e. this.page
|
||||
this.writeToFolder();
|
||||
}
|
||||
else if (this.feed.quickMode)
|
||||
else if (this.feed.quickMode)
|
||||
{
|
||||
debug(this.identity + " in quick mode; storing");
|
||||
|
||||
|
@ -205,14 +205,14 @@ FeedItem.prototype =
|
|||
var content = MESSAGE_TEMPLATE;
|
||||
content = content.replace(/%CONTENT_TEMPLATE%/, LOCAL_CONTENT_TEMPLATE);
|
||||
content = content.replace(/%STYLE%/, LOCAL_STYLE);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%TITLE%/, this.title);
|
||||
content = content.replace(/%URL%/g, this.mURL);
|
||||
content = content.replace(/%CONTENT%/, this.content);
|
||||
this.content = content; // XXX store it elsewhere, f.e. this.page
|
||||
this.writeToFolder();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
//debug(this.identity + " needs content; downloading");
|
||||
debug(this.identity + " needs content; creating and storing");
|
||||
|
@ -220,7 +220,7 @@ FeedItem.prototype =
|
|||
content = content.replace(/%CONTENT_TEMPLATE%/, REMOTE_CONTENT_TEMPLATE);
|
||||
content = content.replace(/%STYLE%/, REMOTE_STYLE);
|
||||
content = content.replace(/%TITLE%/, this.title);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%BASE%/, this.contentBase);
|
||||
content = content.replace(/%URL%/g, this.mURL);
|
||||
content = content.replace(/%DESCRIPTION%/, this.description || this.title);
|
||||
this.content = content; // XXX store it elsewhere, f.e. this.page
|
||||
|
@ -237,10 +237,10 @@ FeedItem.prototype =
|
|||
var server = this.feed.server;
|
||||
var folder = this.feed.folder;
|
||||
|
||||
if (!folder)
|
||||
if (!folder)
|
||||
{
|
||||
debug(this.feed.name + " folder doesn't exist; creating");
|
||||
debug("creating " + this.feed.name + "as child of " + server.rootMsgFolder + "\n");
|
||||
debug("creating " + this.feed.name + "as child of " + server.rootMsgFolder + "\n");
|
||||
server.rootMsgFolder.createSubfolder(this.feed.name, null /* supposed to be a msg window */);
|
||||
folder = server.rootMsgFolder.FindSubFolder(this.feed.name);
|
||||
debug(this.identity + " not stored (folder didn't exist)");
|
||||
|
@ -262,21 +262,21 @@ FeedItem.prototype =
|
|||
downloaded = ds.GetTarget(itemResource, FZ_STORED, true);
|
||||
}
|
||||
|
||||
if (!downloaded || downloaded.QueryInterface(Components.interfaces.nsIRDFLiteral).Value == "false")
|
||||
if (!downloaded || downloaded.QueryInterface(Components.interfaces.nsIRDFLiteral).Value == "false")
|
||||
{
|
||||
// HACK ALERT: before we give up, try to work around an entity escaping bug in RDF
|
||||
// See Bug #258465 for more details
|
||||
itemURI = itemURI.replace(/</g, '<');
|
||||
itemURI = itemURI.replace(/>/g, '>');
|
||||
itemURI = itemURI.replace(/"/g, '"');
|
||||
itemURI = itemURI.replace(/&/g, '&');
|
||||
itemURI = itemURI.replace(/&/g, '&');
|
||||
|
||||
debug('Failed to find item, trying entity replacement version: ' + itemURI);
|
||||
itemResource = rdf.GetResource(itemURI);
|
||||
downloaded = ds.GetTarget(itemResource, FZ_STORED, true);
|
||||
|
||||
if (downloaded)
|
||||
{
|
||||
{
|
||||
debug(this.identity + " not stored");
|
||||
return true;
|
||||
}
|
||||
|
@ -284,21 +284,21 @@ FeedItem.prototype =
|
|||
debug(this.identity + " not stored");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
debug(this.identity + " stored");
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
markValid: function()
|
||||
markValid: function()
|
||||
{
|
||||
debug("validating " + this.mURL);
|
||||
var ds = getItemsDS(this.feed.server);
|
||||
|
||||
var itemURI = this.itemUniqueURI;
|
||||
var resource = rdf.GetResource(itemURI);
|
||||
|
||||
|
||||
// Backward compatibility: we might have stored this item before isStoredWithId
|
||||
// has been turned on for RSS 2.0 (bug 354345). Check whether this item has been
|
||||
// stored with its URL.
|
||||
|
@ -307,59 +307,59 @@ FeedItem.prototype =
|
|||
|
||||
if (!ds.HasAssertion(resource, FZ_FEED, rdf.GetResource(this.feed.url), true))
|
||||
ds.Assert(resource, FZ_FEED, rdf.GetResource(this.feed.url), true);
|
||||
|
||||
if (ds.hasArcOut(resource, FZ_VALID))
|
||||
|
||||
if (ds.hasArcOut(resource, FZ_VALID))
|
||||
{
|
||||
var currentValue = ds.GetTarget(resource, FZ_VALID, true);
|
||||
ds.Change(resource, FZ_VALID, currentValue, RDF_LITERAL_TRUE);
|
||||
}
|
||||
else
|
||||
else
|
||||
ds.Assert(resource, FZ_VALID, RDF_LITERAL_TRUE, true);
|
||||
},
|
||||
|
||||
markStored: function()
|
||||
markStored: function()
|
||||
{
|
||||
var ds = getItemsDS(this.feed.server);
|
||||
var itemURI = this.itemUniqueURI;
|
||||
var resource = rdf.GetResource(itemURI);
|
||||
|
||||
|
||||
if (!ds.HasAssertion(resource, FZ_FEED, rdf.GetResource(this.feed.url), true))
|
||||
ds.Assert(resource, FZ_FEED, rdf.GetResource(this.feed.url), true);
|
||||
|
||||
|
||||
var currentValue;
|
||||
if (ds.hasArcOut(resource, FZ_STORED))
|
||||
if (ds.hasArcOut(resource, FZ_STORED))
|
||||
{
|
||||
currentValue = ds.GetTarget(resource, FZ_STORED, true);
|
||||
ds.Change(resource, FZ_STORED, currentValue, RDF_LITERAL_TRUE);
|
||||
}
|
||||
else
|
||||
else
|
||||
ds.Assert(resource, FZ_STORED, RDF_LITERAL_TRUE, true);
|
||||
},
|
||||
|
||||
mimeEncodeSubject: function(aSubject, aCharset)
|
||||
{
|
||||
{
|
||||
// get the mime header encoder service
|
||||
var mimeEncoder = Components.classes["@mozilla.org/messenger/mimeconverter;1"].getService(Components.interfaces.nsIMimeConverter);
|
||||
|
||||
// this routine sometimes throws exceptions for mis-encoded data so wrap it
|
||||
// this routine sometimes throws exceptions for mis-encoded data so wrap it
|
||||
// with a try catch for now..
|
||||
var newSubject;
|
||||
try
|
||||
try
|
||||
{
|
||||
newSubject = mimeEncoder.encodeMimePartIIStr(this.mUnicodeConverter.ConvertFromUnicode(aSubject), false, aCharset, 9, 72);
|
||||
}
|
||||
catch (ex)
|
||||
{
|
||||
newSubject = aSubject;
|
||||
catch (ex)
|
||||
{
|
||||
newSubject = aSubject;
|
||||
}
|
||||
|
||||
return newSubject;
|
||||
},
|
||||
},
|
||||
|
||||
writeToFolder: function()
|
||||
writeToFolder: function()
|
||||
{
|
||||
debug(this.identity + " writing to message folder" + this.feed.name + "\n");
|
||||
|
||||
|
||||
var server = this.feed.server;
|
||||
this.mUnicodeConverter.charset = this.characterSet;
|
||||
|
||||
|
@ -369,7 +369,7 @@ FeedItem.prototype =
|
|||
|
||||
// Convert the title to UTF-16 before performing our HTML entity replacement
|
||||
// reg expressions.
|
||||
var title = this.title;
|
||||
var title = this.title;
|
||||
|
||||
// the subject may contain HTML entities.
|
||||
// Convert these to their unencoded state. i.e. & becomes '&'
|
||||
|
@ -377,7 +377,7 @@ FeedItem.prototype =
|
|||
title = title.replace(/>/g, '>');
|
||||
title = title.replace(/"/g, '"');
|
||||
title = title.replace(/&/g, '&');
|
||||
|
||||
|
||||
// Compress white space in the subject to make it look better.
|
||||
title = title.replace(/[\t\r\n]+/g, " ");
|
||||
|
||||
|
@ -420,7 +420,7 @@ FeedItem.prototype =
|
|||
source += 'Content-Type: multipart/mixed;\n boundary="' + ENCLOSURE_HEADER_BOUNDARY_PREFIX + boundaryID + '"' + '\n\n' +
|
||||
'This is a multi-part message in MIME format.\n' + ENCLOSURE_BOUNDARY_PREFIX + boundaryID + '\n' +
|
||||
'Content-Type: text/html; charset=' + this.characterSet + '\n' +
|
||||
'Content-Transfer-Encoding: 8bit\n' +
|
||||
'Content-Transfer-Encoding: 8bit\n' +
|
||||
this.content;
|
||||
source += this.enclosure.convertToAttachment(boundaryID);
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ FeedItem.prototype =
|
|||
{
|
||||
source += 'Content-Type: text/html; charset=' + this.characterSet + '\n' +
|
||||
'\n' + this.content;
|
||||
|
||||
|
||||
}
|
||||
|
||||
debug(this.identity + " is " + source.length + " characters long");
|
||||
|
@ -448,7 +448,7 @@ FeedItem.prototype =
|
|||
// A feed enclosure is to RSS what an attachment is for e-mail. We make enclosures look
|
||||
// like attachments in the UI.
|
||||
|
||||
function FeedEnclosure(aURL, aContentType, aLength)
|
||||
function FeedEnclosure(aURL, aContentType, aLength)
|
||||
{
|
||||
this.mURL = aURL;
|
||||
this.mContentType = aContentType;
|
||||
|
@ -464,7 +464,7 @@ function FeedEnclosure(aURL, aContentType, aLength)
|
|||
}
|
||||
}
|
||||
|
||||
FeedEnclosure.prototype =
|
||||
FeedEnclosure.prototype =
|
||||
{
|
||||
mURL: "",
|
||||
mContentType: "",
|
||||
|
@ -477,9 +477,9 @@ FeedEnclosure.prototype =
|
|||
{
|
||||
return '\n' +
|
||||
ENCLOSURE_BOUNDARY_PREFIX + aBoundaryID + '\n' +
|
||||
'Content-Type: ' + this.mContentType + '; name="' + this.mFileName + '"\n' +
|
||||
'Content-Type: ' + this.mContentType + '; name="' + this.mFileName + '"\n' +
|
||||
'X-Mozilla-External-Attachment-URL: ' + this.mURL + '\n' +
|
||||
'Content-Disposition: attachment; filename="' + this.mFileName + '"\n\n' +
|
||||
'Content-Disposition: attachment; filename="' + this.mFileName + '"\n\n' +
|
||||
'This MIME attachment is stored separately from the message.\n' +
|
||||
ENCLOSURE_BOUNDARY_PREFIX + aBoundaryID + '--' + '\n';
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK ******
|
||||
|
||||
|
||||
<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://messenger-newsblog/locale/feed-properties.dtd">
|
||||
|
@ -75,7 +75,7 @@
|
|||
<column flex="1"/>
|
||||
</columns>
|
||||
|
||||
<rows>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="&feedLocation.label;" accesskey="&feedLocation.accesskey;" control="feedLocation"/>
|
||||
<textbox id="feedLocation"/>
|
||||
|
@ -97,8 +97,8 @@
|
|||
<menuitem id="rssAccountMenuItem"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
|
||||
<template>
|
||||
|
||||
<template>
|
||||
<!-- cheat and use the CanRename property to make sure we don't list the Trash folder as a possible feed folder -->
|
||||
<rule nc:CanFileMessages="true" iscontainer="true" isempty="false" nc:CanRename="true">
|
||||
<menupopup>
|
||||
|
@ -110,7 +110,7 @@
|
|||
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">
|
||||
<menupopup class="menulist-menupopup">
|
||||
<menuitem label="&choosethisfolder.label;"
|
||||
oncommand="PickedMsgFolder(event.target.parentNode.parentNode,'selectFolder')"/>
|
||||
<menuseparator/>
|
||||
|
@ -120,7 +120,7 @@
|
|||
</rule>
|
||||
<rule nc:CanFileMessages="true" nc:CanRename="true">
|
||||
<menupopup>
|
||||
<menuitem uri="..." value="..."
|
||||
<menuitem uri="..." value="..."
|
||||
class="folderMenuItem menuitem-iconic"
|
||||
oncommand="PickedMsgFolder(event.target,'selectFolder')"
|
||||
SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
|
||||
|
@ -139,6 +139,6 @@
|
|||
|
||||
<separator class="thin"/>
|
||||
|
||||
<checkbox id="quickMode" accesskey="&quickMode.accesskey;" label="&quickMode.label;"/>
|
||||
<checkbox id="quickMode" accesskey="&quickMode.accesskey;" label="&quickMode.label;"/>
|
||||
|
||||
</dialog>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0"?>
|
||||
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
@ -64,7 +64,7 @@
|
|||
<script type="application/x-javascript" src="FeedItem.js"/>
|
||||
<script type="application/x-javascript" src="feed-parser.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
|
||||
|
||||
<keyset id="extensionsKeys">
|
||||
<key id="key_close" key="&cmd.close.commandKey;" modifiers="accel" oncommand="window.close();"/>
|
||||
<key id="key_close2" keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
|
@ -111,32 +111,32 @@
|
|||
</hbox>
|
||||
|
||||
<hbox id="statusContainerBox" align="center">
|
||||
<label id="statusText" class="statusbarpanel-text" crop="right" flex="1"/>
|
||||
<label id="statusText" class="statusbarpanel-text" crop="right" flex="1"/>
|
||||
<progressmeter id="progressMeter" collapsed="true" class="progressmeter-statusbar" style="margin-right: 5px;" mode="normal" value="0"/>
|
||||
</hbox>
|
||||
|
||||
<hbox align="end">
|
||||
<hbox class="actionButtons" flex="1">
|
||||
<button id="addFeed"
|
||||
<button id="addFeed"
|
||||
label="&button.addFeed.label;" accesskey="&button.addFeed.accesskey;"
|
||||
oncommand="gFeedSubscriptionsWindow.addFeed();"/>
|
||||
|
||||
<button id="editFeed" disabled="true"
|
||||
<button id="editFeed" disabled="true"
|
||||
label="&button.editFeed.label;" accesskey="&button.editFeed.accesskey;"
|
||||
oncommand="gFeedSubscriptionsWindow.editFeed();"/>
|
||||
|
||||
<button id="removeFeed" disabled="true"
|
||||
<button id="removeFeed" disabled="true"
|
||||
label="&button.removeFeed.label;" accesskey="&button.removeFeed.accesskey;"
|
||||
oncommand="gFeedSubscriptionsWindow.removeFeed();"/>
|
||||
|
||||
<button id="importOPML"
|
||||
|
||||
<button id="importOPML"
|
||||
label="&button.importOPML.label;" accesskey="&button.importOPML.accesskey;"
|
||||
oncommand="gFeedSubscriptionsWindow.importOPML();"/>
|
||||
|
||||
<button id="exportOPML"
|
||||
|
||||
<button id="exportOPML"
|
||||
label="&button.exportOPML.label;" accesskey="&button.exportOPML.accesskey;"
|
||||
oncommand="gFeedSubscriptionsWindow.exportOPML();"/>
|
||||
|
||||
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
|
|
|
@ -92,7 +92,7 @@ var containerUtils = Components.classes["@mozilla.org/rdf/container-utils;1"]
|
|||
var fileHandler = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService)
|
||||
.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
|
||||
|
||||
// helper routine that checks our subscriptions list array and returns true if the url
|
||||
// helper routine that checks our subscriptions list array and returns true if the url
|
||||
// is already in our list. This is used to prevent the user from subscribing to the same
|
||||
// feed multiple times for the same server...
|
||||
function feedAlreadyExists(aUrl, aServer)
|
||||
|
@ -101,7 +101,7 @@ function feedAlreadyExists(aUrl, aServer)
|
|||
return feeds.IndexOf(rdf.GetResource(aUrl)) != -1;
|
||||
}
|
||||
|
||||
function addFeed(url, title, destFolder)
|
||||
function addFeed(url, title, destFolder)
|
||||
{
|
||||
var ds = getSubscriptionsDS(destFolder.server);
|
||||
var feeds = getSubscriptionsList(destFolder.server);
|
||||
|
@ -121,7 +121,7 @@ function addFeed(url, title, destFolder)
|
|||
ds.Assert(id, DC_IDENTIFIER, rdf.GetLiteral(url), true);
|
||||
if (title)
|
||||
ds.Assert(id, DC_TITLE, rdf.GetLiteral(title), true);
|
||||
ds.Assert(id, FZ_DESTFOLDER, destFolder, true);
|
||||
ds.Assert(id, FZ_DESTFOLDER, destFolder, true);
|
||||
ds = ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
ds.Flush();
|
||||
}
|
||||
|
@ -137,26 +137,26 @@ function updateFolderFeedUrl(aFolder, aFeedUrl, aRemoveUrl)
|
|||
var oldFeedUrl = folderInfo.getCharPtrProperty("feedUrl");
|
||||
|
||||
if (aRemoveUrl)
|
||||
{
|
||||
{
|
||||
// remove our feed url string from the list of feed urls
|
||||
var newFeedUrl = oldFeedUrl.replace(kFeedUrlDelimiter + aFeedUrl, "");
|
||||
folderInfo.setCharPtrProperty("feedUrl", newFeedUrl);
|
||||
}
|
||||
else
|
||||
folderInfo.setCharPtrProperty("feedUrl", oldFeedUrl + kFeedUrlDelimiter + aFeedUrl);
|
||||
}
|
||||
else
|
||||
folderInfo.setCharPtrProperty("feedUrl", oldFeedUrl + kFeedUrlDelimiter + aFeedUrl);
|
||||
|
||||
// commit the db to preserve our changes
|
||||
msgdb.Close(true);
|
||||
}
|
||||
|
||||
function getNodeValue(node)
|
||||
function getNodeValue(node)
|
||||
{
|
||||
if (node && node.textContent)
|
||||
return node.textContent;
|
||||
else if (node && node.firstChild)
|
||||
else if (node && node.firstChild)
|
||||
{
|
||||
var ret = "";
|
||||
for (var child = node.firstChild; child; child = child.nextSibling)
|
||||
for (var child = node.firstChild; child; child = child.nextSibling)
|
||||
{
|
||||
var value = getNodeValue(child);
|
||||
if (value)
|
||||
|
@ -170,10 +170,10 @@ function getNodeValue(node)
|
|||
return null;
|
||||
}
|
||||
|
||||
function getRDFTargetValue(ds, source, property)
|
||||
function getRDFTargetValue(ds, source, property)
|
||||
{
|
||||
var node = ds.GetTarget(source, property, true);
|
||||
if (node)
|
||||
if (node)
|
||||
{
|
||||
try{
|
||||
node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
|
@ -181,16 +181,16 @@ function getRDFTargetValue(ds, source, property)
|
|||
return node.Value;
|
||||
}catch(e){
|
||||
// if the RDF was bogus, do nothing. rethrow if it's some other problem
|
||||
if(!((e instanceof Components.interfaces.nsIXPCException)
|
||||
&& (e.result==Components.results.NS_ERROR_NO_INTERFACE)))
|
||||
if(!((e instanceof Components.interfaces.nsIXPCException)
|
||||
&& (e.result==Components.results.NS_ERROR_NO_INTERFACE)))
|
||||
throw e;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getSubscriptionsDS(server)
|
||||
function getSubscriptionsDS(server)
|
||||
{
|
||||
var file = getSubscriptionsFile(server);
|
||||
var url = fileHandler.getURLSpecFromFile(file);
|
||||
|
@ -205,7 +205,7 @@ function getSubscriptionsDS(server)
|
|||
return ds;
|
||||
}
|
||||
|
||||
function getSubscriptionsList(server)
|
||||
function getSubscriptionsList(server)
|
||||
{
|
||||
var ds = getSubscriptionsDS(server);
|
||||
var list = ds.GetTarget(FZ_ROOT, FZ_FEEDS, true);
|
||||
|
@ -215,7 +215,7 @@ function getSubscriptionsList(server)
|
|||
return list;
|
||||
}
|
||||
|
||||
function getSubscriptionsFile(server)
|
||||
function getSubscriptionsFile(server)
|
||||
{
|
||||
server.QueryInterface(Components.interfaces.nsIRssIncomingServer);
|
||||
var file = server.subscriptionsDataSourcePath;
|
||||
|
@ -227,7 +227,7 @@ function getSubscriptionsFile(server)
|
|||
return file;
|
||||
}
|
||||
|
||||
function createSubscriptionsFile(file)
|
||||
function createSubscriptionsFile(file)
|
||||
{
|
||||
file = new LocalFile(file, MODE_WRONLY | MODE_CREATE);
|
||||
file.write('\
|
||||
|
@ -246,7 +246,7 @@ function createSubscriptionsFile(file)
|
|||
file.close();
|
||||
}
|
||||
|
||||
function getItemsDS(server)
|
||||
function getItemsDS(server)
|
||||
{
|
||||
var file = getItemsFile(server);
|
||||
var url = fileHandler.getURLSpecFromFile(file);
|
||||
|
@ -264,13 +264,13 @@ function getItemsDS(server)
|
|||
return ds;
|
||||
}
|
||||
|
||||
function getItemsFile(server)
|
||||
function getItemsFile(server)
|
||||
{
|
||||
server.QueryInterface(Components.interfaces.nsIRssIncomingServer);
|
||||
var file = server.feedItemsDataSourcePath;
|
||||
|
||||
// If the file doesn't exist, create it.
|
||||
if (!file.exists())
|
||||
if (!file.exists())
|
||||
{
|
||||
var newfile = new LocalFile(file, MODE_WRONLY | MODE_CREATE);
|
||||
newfile.write('\
|
||||
|
@ -285,16 +285,16 @@ function getItemsFile(server)
|
|||
return file;
|
||||
}
|
||||
|
||||
function removeAssertions(ds, resource)
|
||||
function removeAssertions(ds, resource)
|
||||
{
|
||||
var properties = ds.ArcLabelsOut(resource);
|
||||
var property;
|
||||
while (properties.hasMoreElements())
|
||||
while (properties.hasMoreElements())
|
||||
{
|
||||
property = properties.getNext();
|
||||
var values = ds.GetTargets(resource, property, true);
|
||||
var value;
|
||||
while (values.hasMoreElements())
|
||||
while (values.hasMoreElements())
|
||||
{
|
||||
value = values.getNext();
|
||||
ds.Unassert(resource, property, value, true);
|
||||
|
@ -317,7 +317,7 @@ function isValidRFC822Date(pubDate)
|
|||
function dateRescue(dateString)
|
||||
{
|
||||
// Deal with various kinds of invalid dates
|
||||
if(!isNaN(parseInt(dateString)))
|
||||
if(!isNaN(parseInt(dateString)))
|
||||
{ // It's an integer, so maybe it's a timestamp
|
||||
var d = new Date(parseInt(dateString)*1000);
|
||||
var now = new Date();
|
||||
|
@ -331,10 +331,10 @@ function dateRescue(dateString)
|
|||
}
|
||||
if(dateString.search(/^\d\d\d\d/) != -1) //Could be a ISO8601/W3C date
|
||||
return W3CToIETFDate(dateString);
|
||||
|
||||
|
||||
// Can't help. Set to current time.
|
||||
return (new Date()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
// Could be a prototype on String, but I don't know the policy on that
|
||||
function trimString(s)
|
||||
|
|
Загрузка…
Ссылка в новой задаче