(js) Improve Contacts controllers

This commit is contained in:
Francis Lachapelle
2015-05-06 17:46:58 -04:00
parent 0eb2ecd2f2
commit 2d46f4fd33
2 changed files with 20 additions and 17 deletions
@@ -67,7 +67,7 @@
$scope.card.$reset();
if ($scope.card.isNew) {
// Cancelling the creation of a card
$scope.card = null;
$rootScope.card = null;
$state.go('app.addressbook', { addressbookId: $scope.currentFolder.id });
}
else {
@@ -87,7 +87,7 @@
return o.id == card.id;
});
// Remove card object from scope
$scope.card = null;
$rootScope.card = null;
$state.go('app.addressbook', { addressbookId: $scope.currentFolder.id });
}, function(data, status) {
Dialog.alert(l('Warning'), l('An error occured while deleting the card "%{0}".',
@@ -98,6 +98,6 @@
}
angular
.module('SOGo.ContactsUI')
.controller('CardController', CardController);
.module('SOGo.ContactsUI')
.controller('CardController', CardController);
})();