edit mailinglists with a dialog instead of inline
This commit is contained in:
@@ -91,6 +91,30 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
},
|
||||
|
||||
edit: {
|
||||
busy: false,
|
||||
error: null,
|
||||
list: null,
|
||||
|
||||
show: function (list) {
|
||||
$scope.mailinglists.edit.list = list;
|
||||
|
||||
$('#mailinglistEditModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.mailinglists.edit.busy = true;
|
||||
|
||||
Client.updateMailingList($scope.selectedDomain.domain, $scope.mailinglists.edit.list.name, $scope.mailinglists.edit.list.members, function (error) {
|
||||
$scope.mailinglists.edit.busy = false;
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
$('#mailinglistEditModal').modal('hide');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
remove: {
|
||||
busy: false,
|
||||
list: null,
|
||||
@@ -134,17 +158,6 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
submit: function (list) {
|
||||
list.busy = true;
|
||||
|
||||
Client.updateMailingList($scope.selectedDomain.domain, list.name, list.members, function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
list.orig.members = list.members;
|
||||
list.busy = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -216,7 +229,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
$scope.mailboxes.remove.busy = true;
|
||||
$scope.mailboxes.edit.busy = true;
|
||||
|
||||
Client.updateMailbox($scope.selectedDomain.domain, $scope.mailboxes.edit.mailbox.name, $scope.mailboxes.edit.mailbox.owner.id, function (error) {
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user