Fix slider steps with the unit changes

This commit is contained in:
Girish Ramakrishnan
2022-10-13 21:57:12 +02:00
parent 60f8ab9030
commit 41604feb02
6 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
$scope.domain = null;
$scope.adminDomain = null;
$scope.diskUsage = {};
$scope.storageQuotaTicks = [ 1*1024*1024*1024, 15*1024*1024*1024, 50*1024*1024*1024, 100*1024*1024*1024 ];
$scope.storageQuotaTicks = [ 1*1000*1000*1000, 15*1000*1000*1000, 50*1000*1000*1000, 100*1000*1000*1000 ];
$scope.expectedDnsRecords = {
mx: { },
@@ -638,7 +638,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
}
function done() {
$scope.diskUsage[$scope.mailboxes.edit.name + '@' + $scope.domain.domain].quotaLimit = $scope.mailboxes.edit.storageQuotaEnabled ? $scope.mailboxes.edit.storageQuota/1024 : 0; // hack to avoid refresh
$scope.diskUsage[$scope.mailboxes.edit.name + '@' + $scope.domain.domain].quotaLimit = $scope.mailboxes.edit.storageQuotaEnabled ? $scope.mailboxes.edit.storageQuota/1000 : 0; // hack to avoid refresh
$scope.mailboxes.edit.busy = false;
$scope.mailboxes.edit.error = null;
@@ -709,8 +709,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
m.ownerDisplayName = m.owner ? m.owner.display : ''; // this meta property is set when we get the user list
var u = $scope.diskUsage[m.name + '@' + m.domain]; // this is unset when no emails have been received yet
m.usage = (u && u.quotaValue * 1024) || 0;
m.limit = (u && u.quotaLimit * 1024) || 0;
m.usage = (u && u.quotaValue * 1000) || 0;
m.limit = (u && u.quotaLimit * 1000) || 0;
});
$scope.mailboxes.mailboxes = mailboxes;