Use space instead of command for tag-input

this makes sure that email aliases wrap. if we used comma, it does not wrap
This commit is contained in:
Girish Ramakrishnan
2020-03-28 16:46:06 -07:00
parent bf7d4a550e
commit 1c5ff88e3c
5 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -337,7 +337,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
return;
}
var aliases = $scope.mailboxes.edit.aliases.split(',').map(function (a) { return a.trim(); }).filter(function (a) { return !!a; });
var aliases = $scope.mailboxes.edit.aliases.split(' ').map(function (a) { return a.trim(); }).filter(function (a) { return !!a; });
Client.setAliases($scope.domain.domain, $scope.mailboxes.edit.name, aliases, function (error) {
if (error) {
@@ -398,7 +398,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
if (error) return callback(error);
$scope.mailboxes.mailboxes = mailboxes.map(function (m) {
m.aliases = aliases.filter(function (a) { return a.aliasTarget === m.name; }).map(function (a) { return a.name; }).join(',');
m.aliases = aliases.filter(function (a) { return a.aliasTarget === m.name; }).map(function (a) { return a.name; }).join(' ');
m.owner = $scope.users.find(function (u) { return u.id === m.ownerId; }); // owner may not exist
m.ownerDisplayName = m.owner ? m.owner.display : ''; // this meta property is set when we get the user list