mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-18 00:19:56 +00:00
Bug 178003 Restore sidebar to address book, make it so that the addressing panel allows you to easily add To, Cc or Bcc recipients r=Standard8 sr=bienvenu a=asa
This commit is contained in:
parent
4da6d386e6
commit
478c02c28a
@ -34,6 +34,8 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var gMsgCompose = false;
|
||||
|
||||
function GetAbViewListener()
|
||||
{
|
||||
// the ab panel doesn't care if the total changes, or if the selection changes
|
||||
@ -104,6 +106,14 @@ function AbPanelLoad()
|
||||
Components.interfaces.nsIAbListener.directoryRemoved | Components.interfaces.nsIAbListener.changed);
|
||||
|
||||
gSearchInput = document.getElementById("searchInput");
|
||||
|
||||
// for the compose window we want to show To, Cc, Bcc and a separator
|
||||
// for all other windows we want to show Compose Mail To
|
||||
var popup = document.getElementById("composeMail");
|
||||
gMsgCompose = parent.document.documentElement.getAttribute("windowtype") == "msgcompose";
|
||||
for (var i = 0; i < 4; i++)
|
||||
popup.childNodes[i].hidden = !gMsgCompose;
|
||||
popup.childNodes[4].hidden = gMsgCompose;
|
||||
}
|
||||
|
||||
function AbPanelUnload()
|
||||
@ -114,6 +124,23 @@ function AbPanelUnload()
|
||||
CloseAbView();
|
||||
}
|
||||
|
||||
function AbPanelAdd(addrtype)
|
||||
{
|
||||
var cards = GetSelectedAbCards();
|
||||
var count = cards.length;
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
// turn each card into a properly formatted address
|
||||
var address = GenerateAddressFromCard(cards[i]);
|
||||
if (address)
|
||||
top.awAddRecipient(addrtype, address);
|
||||
else if (gPromptService)
|
||||
gPromptService.alert(window,
|
||||
gAddressBookBundle.getString("emptyEmailAddCardTitle"),
|
||||
gAddressBookBundle.getString("emptyEmailAddCard"));
|
||||
}
|
||||
}
|
||||
|
||||
function AbPanelNewCard()
|
||||
{
|
||||
goNewCardDialog(abList.selectedItem.getAttribute('id'));
|
||||
@ -137,7 +164,10 @@ function OnClickedCard()
|
||||
function AbResultsPaneDoubleClick(card)
|
||||
{
|
||||
// double click for ab panel means "send mail to this person / list"
|
||||
AbNewMessage();
|
||||
if (gMsgCompose)
|
||||
AbPanelAdd('addr_to');
|
||||
else
|
||||
AbNewMessage();
|
||||
}
|
||||
|
||||
function UpdateCardView()
|
||||
|
@ -70,6 +70,10 @@
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/addressbook/addressbook-panel.js"/>
|
||||
|
||||
<popup id="composeMail">
|
||||
<menuitem label="&toButton.label;" accesskey="&toButton.accesskey;" oncommand="AbPanelAdd('addr_to');" default="true"/>
|
||||
<menuitem label="&ccButton.label;" accesskey="&ccButton.accesskey;" oncommand="AbPanelAdd('addr_cc');"/>
|
||||
<menuitem label="&bccButton.label;" accesskey="&bccButton.accesskey;" oncommand="AbPanelAdd('addr_bcc');"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&composeEmail.label;" accesskey="&composeEmail.accesskey;" oncommand="AbNewMessage();" default="true"/>
|
||||
<menuitem label="©Address.label;" accesskey="©Address.accesskey;" oncommand="AbCopyAddress();"/>
|
||||
<menuitem label="&deleteAddrBookCard.label;" accesskey="&deleteAddrBookCard.accesskey;" oncommand="AbDelete();"/>
|
||||
|
@ -47,7 +47,8 @@
|
||||
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
|
||||
|
||||
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://messenger/content/messengercompose/addressingWidgetOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
@ -85,6 +86,8 @@
|
||||
<stringbundle id="bundle_offlinePrompts" src="chrome://messenger/locale/offline.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/printing.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/accountUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
|
||||
@ -146,6 +149,7 @@
|
||||
<!-- View Menu -->
|
||||
<command id="cmd_showComposeToolbar" oncommand="goDoCommand('cmd_showComposeToolbar')"/>
|
||||
<command id="cmd_showFormatToolbar" oncommand="goDoCommand('cmd_showFormatToolbar')"/>
|
||||
<command id="toggleSidebar"/>
|
||||
|
||||
<!-- Options Menu -->
|
||||
<command id="cmd_selectAddress" oncommand="goDoCommand('cmd_selectAddress')"/>
|
||||
@ -192,6 +196,7 @@
|
||||
modifiers="&accel.emacs_conflict;"
|
||||
/>
|
||||
|
||||
<key id="showHideSidebar"/>
|
||||
<!-- Tab/F6 Keys -->
|
||||
<key keycode="VK_TAB" oncommand="SwitchElementFocus(event);" modifiers="control"/>
|
||||
<key keycode="VK_TAB" oncommand="SwitchElementFocus(event);" modifiers="control,shift"/>
|
||||
@ -202,6 +207,7 @@
|
||||
</keyset>
|
||||
<keyset id="editorKeys"/>
|
||||
|
||||
<popup id="sidebarPopup"/>
|
||||
<popup id="msgComposeContext" onpopupshowing="updateEditItems();">
|
||||
<menuitem label="&undo.label;" accesskey="&undo.accesskey;" command="cmd_undo"/>
|
||||
<menuseparator/>
|
||||
@ -288,7 +294,7 @@
|
||||
<menu id="menu_View">
|
||||
<menupopup id="menu_View_Popup">
|
||||
<menu id="menu_Toolbars">
|
||||
<menupopup>
|
||||
<menupopup id="view_toolbars_popup">
|
||||
<menuitem id="menu_showComposeToolbar"
|
||||
type="checkbox"
|
||||
label="&showComposeToolbarCmd.label;"
|
||||
@ -522,11 +528,18 @@
|
||||
|
||||
<splitter id="compose-toolbar-sizer" onmousedown="awSizerListen()" collapse="after"/>
|
||||
|
||||
<!-- sidebar/toolbar/content/status -->
|
||||
<hbox id="sidebar-parent" flex="1">
|
||||
<!-- From sidebarOverlay.xul -->
|
||||
<vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
|
||||
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
|
||||
|
||||
<!-- The mail message body frame -->
|
||||
<vbox id="appcontent" flex="1">
|
||||
<editor type="content-primary" id="content-frame" src="about:blank" name="browser.message.body" flex="1"
|
||||
context="msgComposeContext"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<statusbar id="status-bar" class="chromeclass-status">
|
||||
<statusbarpanel id="component-bar"/>
|
||||
|
@ -41,7 +41,6 @@
|
||||
========================================================================== */
|
||||
|
||||
@import url("chrome://communicator/skin/");
|
||||
@import url("chrome://communicator/skin/sidebar/sidebar.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
@import url("chrome://navigator/content/navigator.css");
|
||||
@import url("chrome://communicator/skin/");
|
||||
@import url("chrome://communicator/skin/sidebar/sidebar.css");
|
||||
@import url("chrome://communicator/skin/bookmarks/bookmarksToolbar.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
@ -40,7 +40,6 @@
|
||||
========================================================================== */
|
||||
|
||||
@import url("chrome://communicator/skin/");
|
||||
@import url("chrome://communicator/skin/sidebar/sidebar.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
@import url("chrome://navigator/content/navigator.css");
|
||||
@import url("chrome://communicator/skin/");
|
||||
@import url("chrome://communicator/skin/sidebar/sidebar.css");
|
||||
@import url("chrome://communicator/skin/bookmarks/bookmarksToolbar.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
@ -39,8 +39,7 @@
|
||||
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/content/sidebar/sidebarOverlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/button.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://navigator/content/navExtraOverlay.xul"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/sidebar/sidebar.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % sidebarOverlayDTD SYSTEM "chrome://communicator/locale/sidebar/sidebarOverlay.dtd" >
|
||||
|
Loading…
x
Reference in New Issue
Block a user