mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-12 02:11:23 +00:00
Improve folder subscription widget
This commit is contained in:
@@ -165,7 +165,18 @@
|
||||
}
|
||||
};
|
||||
$scope.confirmDelete = function() {
|
||||
if ($scope.addressbook.isOwned) {
|
||||
if ($scope.addressbook.isSubscription) {
|
||||
// Unsubscribe without confirmation
|
||||
$rootScope.addressbook.$delete()
|
||||
.then(function() {
|
||||
$rootScope.addressbook = null;
|
||||
}, function(data, status) {
|
||||
Dialog.alert(l('An error occured while deleting the addressbook "%{0}".',
|
||||
$rootScope.addressbook.name),
|
||||
l(data.error));
|
||||
});
|
||||
}
|
||||
else {
|
||||
Dialog.confirm(l('Warning'), l('Are you sure you want to delete the addressbook <em>%{0}</em>?',
|
||||
$scope.addressbook.name))
|
||||
.then(function(res) {
|
||||
@@ -181,18 +192,6 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Unsubscribe without confirmation
|
||||
$rootScope.addressbook.$delete()
|
||||
.then(function() {
|
||||
$rootScope.addressbook = null;
|
||||
}, function(data, status) {
|
||||
Dialog.alert(l('An error occured while deleting the addressbook "%{0}".',
|
||||
$rootScope.addressbook.name),
|
||||
l(data.error));
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
$scope.importCards = function() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user