Ensure sorting by domain and mailbox name for aliases
This commit is contained in:
@@ -415,7 +415,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
|
||||
$scope.mailboxes.edit.aliases.push({
|
||||
name: '',
|
||||
domain: domainName
|
||||
domain: domainName,
|
||||
reversedSortingNotation: 'z'.repeat(100) // quick and dirty to ensure newly added are on bottom
|
||||
});
|
||||
},
|
||||
|
||||
@@ -427,7 +428,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
show: function (mailbox) {
|
||||
$scope.mailboxes.edit.name = mailbox.name;
|
||||
$scope.mailboxes.edit.owner = mailbox.owner; // this can be null if mailbox had no owner
|
||||
$scope.mailboxes.edit.aliases = angular.copy(mailbox.aliases, []);
|
||||
$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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user