parent
fdc82913ef
commit
cc28357553
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [web] fixed creation of chip on blur (sgTransformOnBlur directive)
|
- [web] fixed creation of chip on blur (sgTransformOnBlur directive)
|
||||||
- [web] fixed composition of new messages from Contacts module
|
- [web] fixed composition of new messages from Contacts module
|
||||||
|
- [web] fixed autocompletion of LDAP-based groups (#3673)
|
||||||
|
|
||||||
3.1.0 (2016-05-18)
|
3.1.0 (2016-05-18)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -171,15 +171,12 @@
|
||||||
var promises = [], recipients = [];
|
var promises = [], recipients = [];
|
||||||
|
|
||||||
_.forEach(selectedCards, function(card) {
|
_.forEach(selectedCards, function(card) {
|
||||||
if (card.c_component == 'vcard' && card.c_mail.length) {
|
if (card.$isList({expandable: true})) {
|
||||||
recipients.push(card.c_cn + ' <' + card.c_mail + '>');
|
|
||||||
}
|
|
||||||
else if (card.$isList()) {
|
|
||||||
// If the list's members were already fetch, use them
|
// If the list's members were already fetch, use them
|
||||||
if (angular.isDefined(card.refs) && card.refs.length) {
|
if (angular.isDefined(card.refs) && card.refs.length) {
|
||||||
_.forEach(card.refs, function(ref) {
|
_.forEach(card.refs, function(ref) {
|
||||||
if (ref.email.length)
|
if (ref.email.length)
|
||||||
recipients.push(ref.c_cn + ' <' + ref.email + '>');
|
recipients.push(ref.$shortFormat());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -187,15 +184,19 @@
|
||||||
return card.$futureCardData.then(function(data) {
|
return card.$futureCardData.then(function(data) {
|
||||||
_.forEach(data.refs, function(ref) {
|
_.forEach(data.refs, function(ref) {
|
||||||
if (ref.email.length)
|
if (ref.email.length)
|
||||||
recipients.push(ref.c_cn + ' <' + ref.email + '>');
|
recipients.push(ref.$shortFormat());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (card.c_mail.length) {
|
||||||
|
recipients.push(card.$shortFormat());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$q.all(promises).then(function() {
|
$q.all(promises).then(function() {
|
||||||
|
recipients = _.uniq(recipients);
|
||||||
if (recipients.length)
|
if (recipients.length)
|
||||||
vm.newMessage($event, recipients);
|
vm.newMessage($event, recipients);
|
||||||
});
|
});
|
||||||
|
|
|
@ -285,6 +285,9 @@
|
||||||
else if (this.emails && this.emails.length) {
|
else if (this.emails && this.emails.length) {
|
||||||
email = this.emails[0].value;
|
email = this.emails[0].value;
|
||||||
}
|
}
|
||||||
|
else if (this.c_mail && this.c_mail.length) {
|
||||||
|
email = this.c_mail[0];
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
email = '';
|
email = '';
|
||||||
}
|
}
|
||||||
|
@ -311,8 +314,10 @@
|
||||||
return this.c_component == 'vcard';
|
return this.c_component == 'vcard';
|
||||||
};
|
};
|
||||||
|
|
||||||
Card.prototype.$isList = function() {
|
Card.prototype.$isList = function(options) {
|
||||||
return this.c_component == 'vlist';
|
// isGroup attribute means it's a group of a LDAP source (not expandable on the client-side)
|
||||||
|
var condition = (!options || !options.expandable || options.expandable && !this.isgroup);
|
||||||
|
return this.c_component == 'vlist' && condition;
|
||||||
};
|
};
|
||||||
|
|
||||||
Card.prototype.$addOrgUnit = function(orgUnit) {
|
Card.prototype.$addOrgUnit = function(orgUnit) {
|
||||||
|
|
|
@ -209,7 +209,7 @@
|
||||||
|
|
||||||
recipients = vm.message.editable[field];
|
recipients = vm.message.editable[field];
|
||||||
|
|
||||||
if (contact.$isList()) {
|
if (contact.$isList({expandable: true})) {
|
||||||
// If the list's members were already fetch, use them
|
// If the list's members were already fetch, use them
|
||||||
if (angular.isDefined(contact.refs) && contact.refs.length) {
|
if (angular.isDefined(contact.refs) && contact.refs.length) {
|
||||||
_.forEach(contact.refs, function(ref) {
|
_.forEach(contact.refs, function(ref) {
|
||||||
|
|
Loading…
Reference in a new issue