mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
feat(mail(js)): new button to expand recipients that are LDAP groups
This commit is contained in:
@@ -329,6 +329,16 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (contact.$isGroup({expandable: true})) {
|
||||
recipient = {
|
||||
toString: function () { return contact.$shortFormat(); },
|
||||
isExpandable: true,
|
||||
members: []
|
||||
};
|
||||
contact.$members().then(function (members) {
|
||||
recipient.members = members;
|
||||
});
|
||||
}
|
||||
else {
|
||||
recipient = contact.$shortFormat();
|
||||
}
|
||||
@@ -339,6 +349,16 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
this.expandGroup = function(contact, field) {
|
||||
var recipients, i, j;
|
||||
recipients = vm.message.editable[field];
|
||||
i = recipients.indexOf(contact);
|
||||
recipients.splice(i, 1);
|
||||
for (j = 0; j < contact.members.length; j++) {
|
||||
recipients.splice(i + j, 0, contact.members[j].$shortFormat());
|
||||
}
|
||||
};
|
||||
|
||||
// Drafts autosaving
|
||||
function autosaveDrafts() {
|
||||
vm.message.$save();
|
||||
|
||||
Reference in New Issue
Block a user