Bug 1458384 - Implement missing NewCardCancelButton() in abCard.js to make canceling new card dialog work again. r=jorgk a=jorgk
authoraceman <acelists@atlas.sk>
Wed, 02 May 2018 13:29:00 +0200
changeset 31446 1414abddeccf4aa39109ac3f77c7aa7536cc4f77
parent 31445 6148303b6b767118e104d434cf5d279a30931d8e
child 31447 53506318f147dd358e0737560f256f64a189c81c
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk, jorgk
bugs1458384
Bug 1458384 - Implement missing NewCardCancelButton() in abCard.js to make canceling new card dialog work again. r=jorgk a=jorgk
mail/components/addrbook/content/abCard.js
--- a/mail/components/addrbook/content/abCard.js
+++ b/mail/components/addrbook/content/abCard.js
@@ -455,16 +455,22 @@ function NewCardOKButton()
       gEditCard.card = directory.addCard(gEditCard.card);
       NotifySaveListeners(directory);
     }
   }
 
   return true;  // close the window
 }
 
+function NewCardCancelButton()
+{
+  // If a new photo was created, remove it now as it won't be used.
+  purgeOldPhotos(false);
+}
+
 // Move the data from the cardproperty to the dialog
 function GetCardValues(cardproperty, doc)
 {
   if (!cardproperty)
     return;
 
   // Pass the nsIAbCard and the Document through the listeners
   // to give extensions a chance to populate custom fields.