Add context menu items for adding selected contacts to the to/cc/bcc fields of the compose window.

Pick up some trunk fixes
This commit is contained in:
scott%scott-macgregor.org 2003-07-01 23:56:33 +00:00
Родитель 73bb5159df
Коммит 7d44cd87c1
5 изменённых файлов: 24 добавлений и 4 удалений

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

@ -612,8 +612,10 @@ function DirPaneClick(event)
return;
// if the user clicks on the header / trecol, do nothing
if (event.originalTarget.localName == "treecol")
if (event.originalTarget.localName == "treecol") {
event.preventBubble();
return;
}
var searchInput = document.getElementById("searchInput");
// if there is a searchInput element, and it's not blank
@ -627,10 +629,17 @@ function DirPaneClick(event)
function DirPaneDoubleClick(event)
{
// if the user clicks on the header / trecol, do nothing
if (event.originalTarget.localName == "treecol")
// we only care about left button events
if (event.button != 0)
return;
var row = {}, colID = {}, childElt = {};
dirTree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, colID, childElt);
if (row.value == -1 || row.value > dirTree.view.rowCount-1) {
// double clicking on a non valid row should not open the dir properties dialog
return;
}
if (dirTree && dirTree.treeBoxObject.selection && dirTree.treeBoxObject.selection.count == 1)
AbEditSelectedDirectory();
}

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

@ -58,6 +58,10 @@
<popup id="cardProperties">
<menuitem label="&deleteAddrBookCard.label;" accesskey="&deleteAddrBookCard.accesskey;" oncommand="AbDelete();"/>
<menuitem label="&addrBookCardProperties.label;" accesskey="&addrBookCardProperties.accesskey;" oncommand="AbEditSelectedCard();"/>
<menuseparator/>
<menuitem label="&addtoToFieldMenu.label;" oncommand="addSelectedAddresses('addr_to');"/>
<menuitem label="&addtoCcFieldMenu.label;" oncommand="addSelectedAddresses('addr_cc');"/>
<menuitem label="&addtoBccFieldMenu.label;" oncommand="addSelectedAddresses('addr_bcc');"/>
</popup>
<vbox id="results_box" flex="1">

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

@ -171,6 +171,9 @@ function delayedOnLoadAddressBook()
// this listener only cares when a directory is removed
addrbookSession.addAddressBookListener(gAddressBookAbListener, Components.interfaces.nsIAbListener.directoryRemoved);
var dirTree = GetDirTree();
dirTree.addEventListener("click",DirPaneClick,true);
// initialize the customizeDone method on the customizeable toolbar
var toolbox = document.getElementById("ab-toolbox");
toolbox.customizeDone = MailToolboxCustomizeDone;

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

@ -411,7 +411,6 @@
flags="dont-build-content"
hidecolumnpicker="true"
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('addrbook-select');"
onclick="DirPaneClick(event);"
ondblclick="DirPaneDoubleClick(event);"
onblur="goOnEvent(this,'blur')">

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

@ -1,6 +1,11 @@
<!ENTITY addressbookPicker.label "Addressbook:">
<!ENTITY searchInput.label "Search For:">
<!ENTITY addtoToFieldMenu.label "Add to To field">
<!ENTITY addtoCcFieldMenu.label "Add to Cc field">
<!ENTITY addtoBccFieldMenu.label "Add to Bcc field">
<!ENTITY toButton.label "Add to To:">
<!ENTITY ccButton.label "Add to Cc:">