mailbox: storage quota slider
This commit is contained in:
@@ -152,6 +152,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="storageQuota">
|
||||
<input id="storageQuota" type="checkbox" ng-model="mailboxes.edit.storageQuotaEnabled">
|
||||
{{ 'email.editMailboxDialog.enableStorageQuota' | tr }}: <b ng-hide="!mailboxes.edit.storageQuotaEnabled">{{ mailboxes.edit.storageQuota | prettyByteSize }}</b>
|
||||
<b ng-hide="mailboxes.edit.storageQuotaEnabled">{{ 'mailboxes.edit.unlimitedStorageQuota' | tr }}</b>
|
||||
</input>
|
||||
</label>
|
||||
<div style="padding: 0 10px;">
|
||||
<slider id="storageQuota" ng-disabled="!mailboxes.edit.storageQuotaEnabled" ng-model="mailboxes.edit.storageQuota" step="134217728" tooltip="hide" ticks="storageQuotaTicks" ticks-snap-bounds="67108864"></slider>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="mailboxes.edit.enablePop3"> {{ 'email.updateMailboxDialog.enablePop3' | tr }}</input>
|
||||
|
||||
+8
-1
@@ -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