mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-13 23:45:27 +00:00
Expose all email addresses in autocompletion
This change is immediately applicable to LDAP-based system address books. However, personal SQL-based address books must have their quick tables recreated. To do so, one must use sogo-tool to backup and restore the user's data. Resolves #3443, #3526
This commit is contained in:
@@ -424,6 +424,27 @@
|
||||
return this.refs.length - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function explode
|
||||
* @memberof Card.prototype
|
||||
* @desc Create a new Card associated to each email address of this card.
|
||||
* @return an array of Card instances
|
||||
*/
|
||||
Card.prototype.explode = function() {
|
||||
var _this = this, cards = [], data;
|
||||
|
||||
if (this.emails.length > 1) {
|
||||
data = this.$omit();
|
||||
_.forEach(this.emails, function(email) {
|
||||
var card = new Card(angular.extend({}, data, {emails: [email]}));
|
||||
cards.push(card);
|
||||
});
|
||||
return cards;
|
||||
}
|
||||
else
|
||||
return [this];
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $reset
|
||||
* @memberof Card.prototype
|
||||
|
||||
Reference in New Issue
Block a user