Bug 1133355 - The Properties button and context menuitem should be disabled when multiple cards are selected. r=IanN sr=Mnyromyr a=IanN for comm-aurora and comm-beta
authorPhilip Chee <philip.chee@gmail.com>
Wed, 15 Apr 2015 13:46:14 +0800
changeset 25849 2548998cee4273ac210a85ddebf577866ad8136c
parent 25848 7cb2c130de12eee30928fbc69a88d47122cdc55d
child 25850 f13db5b3038705c52fdcb599d851ef002744b052
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, Mnyromyr, IanN
bugs1133355
Bug 1133355 - The Properties button and context menuitem should be disabled when multiple cards are selected. r=IanN sr=Mnyromyr a=IanN for comm-aurora and comm-beta
suite/mailnews/addrbook/addressbook-panel.xul
suite/mailnews/addrbook/addressbook.js
--- a/suite/mailnews/addrbook/addressbook-panel.xul
+++ b/suite/mailnews/addrbook/addressbook-panel.xul
@@ -34,31 +34,32 @@
   <script type="application/javascript" src="chrome://messenger/content/addressbook/abResultsPane.js"/>
   <script type="application/javascript" src="chrome://messenger/content/addressbook/abSelectAddressesDialog.js"/>
   <script type="application/javascript" src="chrome://messenger/content/addressbook/addressbook-panel.js"/>
   <script type="application/javascript"
           src="chrome://communicator/content/utilityOverlay.js"/>
 
   <commandset id="addressbook-panel-commandset">
     <command id="cmd_newlist" oncommand="AbNewList();"/>
+    <command id="cmd_properties" oncommand="goDoCommand('cmd_properties');"/>
   </commandset>
 
   <menupopup id="composeMail" onpopupshowing="CommandUpdate_AddressBook();">
     <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="&copyAddress.label;" accesskey="&copyAddress.accesskey;" oncommand="AbCopyAddress();"/>
     <menuitem label="&deleteAddrBookCard.label;" accesskey="&deleteAddrBookCard.accesskey;" oncommand="AbDelete();"/>
     <menuseparator/>
     <menuitem label="&newAddrBookCard.label;" accesskey="&newAddrBookCard.accesskey;" oncommand="AbPanelNewCard();"/>
     <menuitem label="&newAddrBookMailingList.label;" accesskey="&newAddrBookMailingList.accesskey;" command="cmd_newlist"/>
     <menuseparator/>
-    <menuitem label="&addrBookCardProperties.label;" accesskey="&addrBookCardProperties.accesskey;" oncommand="AbEditSelectedCard();"/>
+    <menuitem label="&addrBookCardProperties.label;" accesskey="&addrBookCardProperties.accesskey;" command="cmd_properties"/>
   </menupopup>
   <vbox id="results_box" flex="1">
     <hbox id="panel-bar" class="toolbar" align="center">
 	  <label value="&lookIn.label;" control="addressbookList" id="lookInLabel"/>
       <menulist id="addressbookList" 
                 oncommand="DirPaneSelectionChangeMenulist();" flex="1"
                 persist="value">
         <menupopup id="addressbookList-menupopup" class="addrbooksPopup"/>
--- a/suite/mailnews/addrbook/addressbook.js
+++ b/suite/mailnews/addrbook/addressbook.js
@@ -141,16 +141,17 @@ function SetNameColumn(cmd)
 
   Services.prefs.setIntPref(kPrefMailAddrBookLastNameFirst, prefValue);
 }
 
 function CommandUpdate_AddressBook()
 {
   goUpdateCommand('cmd_delete');
   goUpdateCommand('button_delete');
+  goUpdateCommand('cmd_properties');
   goUpdateCommand('cmd_newlist');
 }
 
 function ResultsPaneSelectionChanged()
 {
   UpdateCardView();
 }