mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-26 04:14:19 +00:00
(js) Improve autocomplete of attendees editor
This commit is contained in:
@@ -468,6 +468,22 @@
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @function hasAttendee
|
||||
* @memberof Component.prototype
|
||||
* @desc Verify if one of the email addresses of a Card instance matches an attendee
|
||||
* @param {Object} card - an Card object instance
|
||||
* @returns true if the Card matches an attendee
|
||||
*/
|
||||
Component.prototype.hasAttendee = function(card) {
|
||||
var attendee = _.find(this.attendees, function(attendee) {
|
||||
return _.find(card.emails, function(email) {
|
||||
return email.value == attendee.email;
|
||||
});
|
||||
});
|
||||
return angular.isDefined(attendee);
|
||||
}
|
||||
|
||||
/**
|
||||
* @function $reset
|
||||
* @memberof Component.prototype
|
||||
|
||||
Reference in New Issue
Block a user