diff --git a/mozilla/mail/base/content/FilterListDialog.js b/mozilla/mail/base/content/FilterListDialog.js
index bf35b61d246..e04f9c99c9c 100644
--- a/mozilla/mail/base/content/FilterListDialog.js
+++ b/mozilla/mail/base/content/FilterListDialog.js
@@ -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));
}
diff --git a/mozilla/mail/base/content/customizeToolbar.xul b/mozilla/mail/base/content/customizeToolbar.xul
index b32a7ff7c3a..7d0ead70ed5 100644
--- a/mozilla/mail/base/content/customizeToolbar.xul
+++ b/mozilla/mail/base/content/customizeToolbar.xul
@@ -1,4 +1,4 @@
-
+
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -44,12 +44,12 @@
%customizeToolbarDTD;
]>
-
+
-
-
-
+
+
+
#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 @@
-
+
diff --git a/mozilla/mail/base/content/hiddenWindow.js b/mozilla/mail/base/content/hiddenWindow.js
index b7669502315..3a07d7bc3dc 100755
--- a/mozilla/mail/base/content/hiddenWindow.js
+++ b/mozilla/mail/base/content/hiddenWindow.js
@@ -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)
diff --git a/mozilla/mail/base/content/mail3PaneWindowCommands.js b/mozilla/mail/base/content/mail3PaneWindowCommands.js
index 31ea283f786..b350accb0c5 100644
--- a/mozilla/mail/base/content/mail3PaneWindowCommands.js
+++ b/mozilla/mail/base/content/mail3PaneWindowCommands.js
@@ -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)
diff --git a/mozilla/mail/base/content/mailWindow.js b/mozilla/mail/base/content/mailWindow.js
index ce22e1826bf..6b5b7233a8e 100644
--- a/mozilla/mail/base/content/mailWindow.js
+++ b/mozilla/mail/base/content/mailWindow.js
@@ -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);
}
diff --git a/mozilla/mail/base/content/mailWindowOverlay.xul b/mozilla/mail/base/content/mailWindowOverlay.xul
index 9948701ee1f..dbff750ecf1 100644
--- a/mozilla/mail/base/content/mailWindowOverlay.xul
+++ b/mozilla/mail/base/content/mailWindowOverlay.xul
@@ -70,15 +70,15 @@
-
+
-
+
-
+
@@ -109,14 +109,14 @@
-
+
-
+
@@ -242,7 +242,7 @@
commandupdater="true"
events="mail-toolbar"
oncommandupdate="goUpdateMailMenuItems(this)">
-
+
@@ -265,8 +265,8 @@
events="create-menu-getMsgToolbar,create-menu-file"
oncommandupdate="goUpdateMailMenuItems(this)">
-
@@ -330,7 +330,7 @@
#endif
-
+
@@ -375,8 +375,8 @@
#elifdef XP_UNIX
#endif
-
@@ -486,7 +486,7 @@
sortDirection="ascending"
datasources="rdf:null">
-
-
+
@@ -533,7 +533,7 @@
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
-
@@ -559,7 +559,7 @@
-
+
@@ -624,7 +624,7 @@
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
-
@@ -650,8 +650,8 @@
-
-
-
@@ -813,7 +813,7 @@
oncommand="MsgFolderProperties();"/>
-
@@ -858,7 +858,7 @@
sortDirection="ascending"
datasources="rdf:null">
-
-
-
@@ -948,7 +948,7 @@
sortDirection="ascending"
datasources="rdf:null">
-
-
-
@@ -1021,8 +1021,8 @@
-
+ label="&moveToFolderAgain.label;" accesskey="&moveToFolderAgain.accesskey;"/>
@@ -1067,13 +1067,13 @@
accesskey="&markStarredCmd.accesskey;"
command="cmd_markAsFlagged"/>
-
-
-
@@ -1132,9 +1132,9 @@
-
+
-
-
@@ -1224,7 +1224,7 @@
-
@@ -1243,7 +1243,7 @@
-
+
@@ -1272,12 +1272,12 @@
-
-
@@ -1334,7 +1334,7 @@
-
@@ -1522,14 +1522,14 @@
accesskey="&newMsgCmd.accesskey;"
key="key_newMessage2"
oncommand="MsgNewMessage(null);"/>
-
-
-
@@ -1560,7 +1560,7 @@
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending">
-
-
-
@@ -1648,7 +1648,7 @@
sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
sortDirection="ascending">
-
-
-
@@ -1721,8 +1721,8 @@
-
-
-
#ifndef XP_MACOSX
-
#endif
-
@@ -1835,15 +1835,15 @@
+ accesskey="&runJunkControls.accesskey;"
+ command="cmd_runJunkControls"/>
+ accesskey="&deleteJunk.accesskey;"
+ command="cmd_deleteJunk"/>
-
#ifndef XP_UNIX
@@ -1862,13 +1862,13 @@
#endif
#endif
-
+
#ifdef XP_MACOSX
#include ../../../toolkit/content/macWindowMenu.inc
#endif
-
+
#ifdef XP_WIN
@@ -1907,12 +1907,12 @@
@@ -1924,7 +1924,7 @@
-
+
@@ -1933,13 +1933,13 @@
-
-
-
-
-
+
+
@@ -1971,7 +1971,7 @@
-
+
@@ -1986,7 +1986,7 @@
IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
-
@@ -2012,7 +2012,7 @@
-
-
+
-
-
+
+
@@ -2038,32 +2038,32 @@
-
+
-
+
-
-
+
#ifdef XP_MACOSX
#else
+ observes="button_print" oncommand="goDoCommand('cmd_print')" tooltiptext="&printButton.tooltip;" type="menu-button">
@@ -2071,14 +2071,14 @@
#endif
+ observes="button_mark" tooltiptext="&markButton.tooltip;">
-
@@ -2103,26 +2103,26 @@
-
@@ -2134,11 +2134,11 @@
-
-
+
@@ -2163,13 +2163,13 @@
-
+
-
@@ -2234,6 +2234,6 @@
-
+
diff --git a/mozilla/mail/base/content/messageWindow.js b/mozilla/mail/base/content/messageWindow.js
index 08b061b8582..2b70192276d 100644
--- a/mozilla/mail/base/content/messageWindow.js
+++ b/mozilla/mail/base/content/messageWindow.js
@@ -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()
diff --git a/mozilla/mail/base/content/messageWindow.xul b/mozilla/mail/base/content/messageWindow.xul
index 1cfe7882f84..78a4c9dd580 100644
--- a/mozilla/mail/base/content/messageWindow.xul
+++ b/mozilla/mail/base/content/messageWindow.xul
@@ -1,4 +1,4 @@
-
+
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -37,7 +37,7 @@
#
# ***** END LICENSE BLOCK *****
-
+
@@ -51,7 +51,7 @@
%messengerDTD;
]>
-
+
-
+
#ifdef XP_MACOSX
@@ -126,11 +126,11 @@
oncommand="SendMailToNode(document.popupNode)"/>
+ oncommand="CopyEmailAddress(document.popupNode)"/>
+ observes="cmd_createFilterFromPopup"/>
@@ -148,7 +148,7 @@
-
+
-
-
+
diff --git a/mozilla/mail/base/content/msgHdrViewOverlay.js b/mozilla/mail/base/content/msgHdrViewOverlay.js
index de9c24ba28b..6afbb37acb1 100644
--- a/mozilla/mail/base/content/msgHdrViewOverlay.js
+++ b/mozilla/mail/base/content/msgHdrViewOverlay.js
@@ -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 ".
// (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
diff --git a/mozilla/mail/base/content/msgMail3PaneWindow.js b/mozilla/mail/base/content/msgMail3PaneWindow.js
index a5bf8be5221..6c2c4b154f3 100644
--- a/mozilla/mail/base/content/msgMail3PaneWindow.js
+++ b/mozilla/mail/base/content/msgMail3PaneWindow.js
@@ -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);
}
}
diff --git a/mozilla/mail/base/content/msgSelectOffline.xul b/mozilla/mail/base/content/msgSelectOffline.xul
index e0ae98b655a..0c66356e0b9 100644
--- a/mozilla/mail/base/content/msgSelectOffline.xul
+++ b/mozilla/mail/base/content/msgSelectOffline.xul
@@ -41,10 +41,10 @@
-
-
+
@@ -62,7 +62,7 @@
-
+
&MsgSelectDesc.label;
-
+
@@ -116,7 +116,7 @@
-
+
diff --git a/mozilla/mail/base/content/subscribe.js b/mozilla/mail/base/content/subscribe.js
index 83e8063a6d5..ec6a02bc75d 100644
--- a/mozilla/mail/base/content/subscribe.js
+++ b/mozilla/mail/base/content/subscribe.js
@@ -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 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;
-}
+}
diff --git a/mozilla/mail/components/addrbook/content/abAddressBookNameDialog.js b/mozilla/mail/components/addrbook/content/abAddressBookNameDialog.js
index d20c1d7ee3e..558aedde84a 100644
--- a/mozilla/mail/components/addrbook/content/abAddressBookNameDialog.js
+++ b/mozilla/mail/components/addrbook/content/abAddressBookNameDialog.js
@@ -10,28 +10,28 @@ function abNameOnLoad()
gOkButton = document.documentElement.getButton('accept');
- // look in arguments[0] for parameters
- if ("arguments" in window && window.arguments[0])
- {
+ // 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 ("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
+ }
+
+ // focus on input
gNameInput = document.getElementById('name');
if (gNameInput) {
if (abName)
gNameInput.value = abName;
-
+
if (gCanRename)
gNameInput.focus();
else
@@ -40,15 +40,15 @@ function abNameOnLoad()
abNameDoOkEnabling()
- moveToAlertPosition();
+ moveToAlertPosition();
}
function abNameOKButton()
{
- if (top.okCallback && gCanRename)
+ if (top.okCallback && gCanRename)
top.okCallback(gNameInput.value.replace(/^\s+|\s+$/g, ''));
-
- return true;
+
+ return true;
}
function abNameDoOkEnabling()
diff --git a/mozilla/mail/components/addrbook/content/abCardViewOverlay.js b/mozilla/mail/components/addrbook/content/abCardViewOverlay.js
index 5722fdd91e5..b824fc47678 100644
--- a/mozilla/mail/components/addrbook/content/abCardViewOverlay.js
+++ b/mozilla/mail/components/addrbook/content/abCardViewOverlay.js
@@ -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
diff --git a/mozilla/mail/components/addrbook/content/abCommon.js b/mozilla/mail/components/addrbook/content/abCommon.js
index 40b7fcc9ed5..847d80e1e97 100644
--- a/mozilla/mail/components/addrbook/content/abCommon.js
+++ b/mozilla/mail/components/addrbook/content/abCommon.js
@@ -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;
diff --git a/mozilla/mail/components/addrbook/content/abContactsPanel.xul b/mozilla/mail/components/addrbook/content/abContactsPanel.xul
index d99833ae714..367d403cefd 100644
--- a/mozilla/mail/components/addrbook/content/abContactsPanel.xul
+++ b/mozilla/mail/components/addrbook/content/abContactsPanel.xul
@@ -79,16 +79,16 @@
-
-
-
-
+
+
+
+
-
-
-
+
-
+
-
-
+
-
+
-
-
-
-
+
+
-
+
-
+
-
-
+
+
diff --git a/mozilla/mail/components/addrbook/content/abEditListDialog.xul b/mozilla/mail/components/addrbook/content/abEditListDialog.xul
index 1c756a68b71..0b44c3e0473 100644
--- a/mozilla/mail/components/addrbook/content/abEditListDialog.xul
+++ b/mozilla/mail/components/addrbook/content/abEditListDialog.xul
@@ -1,4 +1,4 @@
-
+
# ***** 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 *****
-
+
@@ -90,18 +90,18 @@
-
+
-
+
diff --git a/mozilla/mail/components/addrbook/content/addressbook.js b/mozilla/mail/components/addrbook/content/addressbook.js
index c82a9cbb194..40309fd98cd 100644
--- a/mozilla/mail/components/addrbook/content/addressbook.js
+++ b/mozilla/mail/components/addrbook/content/addressbook.js
@@ -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)
{
diff --git a/mozilla/mail/components/compose/content/addressingWidgetOverlay.js b/mozilla/mail/components/compose/content/addressingWidgetOverlay.js
index 9d51305d541..1ede0920f99 100644
--- a/mozilla/mail/components/compose/content/addressingWidgetOverlay.js
+++ b/mozilla/mail/components/compose/content/addressingWidgetOverlay.js
@@ -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();
},
diff --git a/mozilla/mail/components/migration/content/migration.js b/mozilla/mail/components/migration/content/migration.js
index 19fb7dbfb7c..8fcffdd1d24 100644
--- a/mozilla/mail/components/migration/content/migration.js
+++ b/mozilla/mail/components/migration/content/migration.js
@@ -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;
diff --git a/mozilla/mail/components/phishing/application.js b/mozilla/mail/components/phishing/application.js
index 58198b2343a..e7cbb7c377f 100644
--- a/mozilla/mail/components/phishing/application.js
+++ b/mozilla/mail/components/phishing/application.js
@@ -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();
+}
diff --git a/mozilla/mail/components/preferences/advanced.xul b/mozilla/mail/components/preferences/advanced.xul
index 06e5f028d92..a80d83d3228 100644
--- a/mozilla/mail/components/preferences/advanced.xul
+++ b/mozilla/mail/components/preferences/advanced.xul
@@ -46,7 +46,7 @@
-
+
-
+
+ type="bool"/>
@@ -96,15 +96,15 @@
-
+
-
+
-
-
-
+
+
-
-
+
-
-
+
+
-
+
@@ -150,10 +150,10 @@
&configEditDesc.label;
-
-
+
@@ -162,8 +162,8 @@