Bug 917563 - Convert abSelectAddressesDialog.xul from a <window class="dialog"> to a <dialog> r=IanN sr=Mnyromyr
authorPhilip Chee <philip.chee@gmail.com>
Thu, 13 Nov 2014 02:15:37 +0800
changeset 21287 8358a65d779c22e99c98ae94092568196ee3d969
parent 21286 26fdf1ba0a9918979229b638b030a27739d7e120
child 21288 e8f0a5702a904668628d965c280e69bcc46ea487
push id1274
push usermbanner@mozilla.com
push dateMon, 12 Jan 2015 19:54:49 +0000
treeherdercomm-beta@baea280adc1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, Mnyromyr
bugs917563
Bug 917563 - Convert abSelectAddressesDialog.xul from a <window class="dialog"> to a <dialog> r=IanN sr=Mnyromyr
suite/mailnews/addrbook/abSelectAddressesDialog.js
suite/mailnews/addrbook/abSelectAddressesDialog.xul
--- a/suite/mailnews/addrbook/abSelectAddressesDialog.js
+++ b/suite/mailnews/addrbook/abSelectAddressesDialog.js
@@ -47,18 +47,16 @@ function OnLoadSelectAddress()
   prefixTo = gAddressBookBundle.getString("prefixTo") + ": ";
   prefixCc = gAddressBookBundle.getString("prefixCc") + ": ";
   prefixBcc = gAddressBookBundle.getString("prefixBcc") + ": ";
 
   UpgradeAddressBookResultsPaneUI("mailnews.ui.select_addresses_results.version");
 
   var toAddress="", ccAddress="", bccAddress="";
 
-  doSetOKCancel(SelectAddressOKButton, 0);
-
   // look in arguments[0] for parameters
   if (window.arguments && window.arguments[0])
   {
     // keep parameters in global for later
     if ( window.arguments[0].composeWindow )
       top.composeWindow = window.arguments[0].composeWindow;
     if ( window.arguments[0].msgCompFields )
       top.msgCompFields = window.arguments[0].msgCompFields;
--- a/suite/mailnews/addrbook/abSelectAddressesDialog.xul
+++ b/suite/mailnews/addrbook/abSelectAddressesDialog.xul
@@ -1,47 +1,45 @@
 <?xml version="1.0"?> 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://messenger/skin/addressbook/selectAddressesDialog.css" type="text/css"?>
 
-<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/addressbook/abResultsPaneOverlay.xul"?>
 <?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 
-<!DOCTYPE window [
+<!DOCTYPE dialog [
 <!ENTITY % abSelectAddressesDialogDTD SYSTEM "chrome://messenger/locale/addressbook/abSelectAddressesDialog.dtd" >
 %abSelectAddressesDialogDTD;
 <!ENTITY % abResultsPaneOverlayDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPaneOverlay.dtd" >
 %abResultsPaneOverlayDTD;
 ]>
 
-<window id="selectAddressesWindow"
+<dialog id="selectAddressesWindow"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&selectAddressWindow.title;"
         class="dialog"
         style="width: 50em; height: 35em;"
         persist="width height screenX screenY"
-        onload="OnLoadSelectAddress()"
-        onunload="OnUnloadSelectAddress()">
+        buttons="accept,cancel"
+        ondialogaccept="return SelectAddressOKButton();"
+        onload="OnLoadSelectAddress();"
+        onunload="OnUnloadSelectAddress();">
 
   <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
   <stringbundle id="bundle_composeMsgs" src="chrome://messenger/locale/messengercompose/composeMsgs.properties"/>
   <script type="application/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
   <script type="application/javascript" src="chrome://messenger/content/addressbook/abSelectAddressesDialog.js"/>
   <script type="application/javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
   <script type="application/javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
 
-
-  <keyset id="dialogKeys"/>
-
   <vbox flex="1">
   
     <hbox id="topBox" align="center">
       <label value="&lookIn.label;" accesskey="&lookIn.accesskey;" control="addressbookList"/>
       <menulist id="addressbookList" 
                 oncommand="DirPaneSelectionChangeMenulist(); document.commandDispatcher.updateCommands('addrbook-select');">
         <menupopup id="addressbookList-menupopup" class="addrbooksPopup"/>
       </menulist>  
@@ -49,36 +47,32 @@
       <textbox id="searchInput" flex="1" type="search"
                aria-controls="abResultsTree"
                placeholder="&for.placeholder;"
                oncommand="onEnterInSearchBar();" clickSelectsAll="true"/>
     </hbox>
     
     <hbox flex="1">    
 
-       <vbox id="resultsBox" flex="4">
-         <tree id="abResultsTree" flex="1" persist="height" />
-       </vbox>
-        
-      <!--<splitter id="vertical-splitter" collapse="before"  persist="state"/>-->
-      
+      <vbox id="resultsBox" flex="4">
+        <tree id="abResultsTree" flex="1" persist="height"/>
+      </vbox>
+
       <vbox id="addToBucketButtonBox">
         <spacer flex="1"/>
         <button id="toButton" label="&toButton.label;" accesskey="&toButton.accesskey;" oncommand="SelectAddressToButton()"/> 
         <spacer class="middle-button-spacer"/>
         <button id="ccButton" label="&ccButton.label;" accesskey="&ccButton.accesskey;" oncommand="SelectAddressCcButton()"/> 
         <spacer class="middle-button-spacer"/>
         <button id="bccButton" label="&bccButton.label;" accesskey="&bccButton.accesskey;" oncommand="SelectAddressBccButton()"/>  
         <spacer class="above-remove-spacer"/>
         <button id="remove" label="&removeButton.label;" accesskey="&removeButton.accesskey;" class="dialog" oncommand="RemoveSelectedFromBucket()"/> 
         <spacer flex="1"/>
       </vbox>
-        
-     <!--<splitter id="bucket-splitter" collapse="before" persist="state"/>-->
-        
+
       <vbox id="bucketBox" flex="1">
         <label value="&addressMessageTo.label;" control="addressBucket"/>
         <tree id="addressBucket" flex="1" hidecolumnpicker="true"
             ondragover="DragAddressOverTargetControl(event);"
             ondragdrop="DropAddressOverTargetControl(event);"
             onselect="DialogBucketPaneSelectionChanged();">
           <treecols>
             <treecol id="addressCol" flex="1" hideheader="true"/>
@@ -88,13 +82,11 @@
       </vbox>
         
     </hbox>
 
     <hbox id="newEditButtonBox">
       <button id="new" label="&newButton.label;" accesskey="&newButton.accesskey;" tooltiptext="&addressPickerNewButton.tooltip;" oncommand="AbNewCard();"/> 
       <button id="edit" label="&editButton.label;" accesskey="&editButton.accesskey;" tooltiptext="&addressPickerEditButton.tooltip;" oncommand="AbEditSelectedCard()"/> 
     </hbox>
-
-    <hbox id="okCancelButtonsRight"/>
   </vbox>
   
-</window>
+</dialog>