Contact editor: fix cancel and reset buttons

This commit is contained in:
Francis Lachapelle
2015-06-11 15:27:05 -04:00
parent 31ea7a5ab5
commit 654c8d26b7
2 changed files with 7 additions and 6 deletions
@@ -294,14 +294,14 @@
l('Are you sure you want to delete the card of <b>%{0}</b>?', card.$fullname()))
.then(function(res) {
if (res) {
// User has confirmed deletion
// User confirmed the deletion
card.$delete()
.then(function() {
// Delete card from list of addressbook
// Remove card from list of addressbook
$rootScope.addressbook.cards = _.reject($rootScope.addressbook.cards, function(o) {
return o.id == card.id;
});
// Delete card object
// Remove card object from scope
delete $scope.card;
// Delete modal editor
$scope.$cardEditorModal.remove();