mailbox: storage quota slider
This commit is contained in:
@@ -42,6 +42,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
$scope.domain = null;
|
||||
$scope.adminDomain = null;
|
||||
$scope.diskUsage = {};
|
||||
$scope.storageQuotaTicks = [ 5*1024*1024, 10*1024*1024, 100*1024*1024, 500*1024*1024, 1024*1024*1024, 5*1024*1024*1024, 15*1024*1024*1024, 25*1024*1024*1024 ];
|
||||
|
||||
$scope.expectedDnsRecords = {
|
||||
mx: { },
|
||||
@@ -571,6 +572,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
aliasesOriginal: [],
|
||||
active: true,
|
||||
enablePop3: false,
|
||||
storageQuota: 0,
|
||||
storageQuotaEnabled: false,
|
||||
|
||||
addAlias: function (event) {
|
||||
event.preventDefault();
|
||||
@@ -597,6 +600,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
$scope.mailboxes.edit.aliases = angular.copy(mailbox.aliases, []).map(function (a) { a.reversedSortingNotation = a.domain + '@' + a.name; return a; });
|
||||
$scope.mailboxes.edit.active = mailbox.active;
|
||||
$scope.mailboxes.edit.enablePop3 = mailbox.enablePop3;
|
||||
$scope.mailboxes.edit.storageQuotaEnabled = !!mailbox.storageQuota;
|
||||
$scope.mailboxes.edit.storageQuota = mailbox.storageQuota || $scope.storageQuotaTicks[0];
|
||||
|
||||
// make a copy for later comparison
|
||||
angular.copy($scope.mailboxes.edit.aliases, $scope.mailboxes.edit.aliasesOriginal);
|
||||
@@ -611,7 +616,9 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
ownerId: $scope.mailboxes.edit.owner.id,
|
||||
ownerType: $scope.mailboxes.edit.owner.type,
|
||||
active: $scope.mailboxes.edit.active,
|
||||
enablePop3: $scope.mailboxes.edit.enablePop3
|
||||
enablePop3: $scope.mailboxes.edit.enablePop3,
|
||||
storageQuota: $scope.mailboxes.edit.storageQuotaEnabled ? $scope.mailboxes.edit.storageQuota : 0,
|
||||
messagesQuota: 0
|
||||
};
|
||||
|
||||
// $scope.mailboxes.edit.owner is expected to be validated by the UI
|
||||
|
||||
Reference in New Issue
Block a user