Add mailbox delete ui
This commit is contained in:
@@ -150,6 +150,31 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
},
|
||||
|
||||
remove: {
|
||||
busy: false,
|
||||
mailbox: null,
|
||||
|
||||
show: function (mailbox) {
|
||||
$scope.mailboxes.remove.mailbox = mailbox;
|
||||
|
||||
$('#mailboxRemoveModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.mailboxes.remove.busy = true;
|
||||
|
||||
Client.removeMailbox($scope.selectedDomain.domain, $scope.mailboxes.remove.mailbox.name, function (error) {
|
||||
$scope.mailboxes.remove.busy = false;
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.mailboxes.remove.mailbox = null;
|
||||
$scope.mailboxes.refresh();
|
||||
|
||||
$('#mailboxRemoveModal').modal('hide');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function () {
|
||||
Client.getMailboxes($scope.selectedDomain.domain, function (error, mailboxes) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user