(js,html) Allow the removable of attendees

This commit is contained in:
Francis Lachapelle
2015-10-02 11:21:43 -04:00
parent 42d306a24b
commit d27c792324
4 changed files with 31 additions and 1 deletions
@@ -739,6 +739,19 @@
return angular.isDefined(attendee);
};
/**
* @function deleteAttendee
* @memberof Component.prototype
* @desc Remove an attendee from the component
* @param {Object} attendee - an object literal defining an attendee
*/
Component.prototype.deleteAttendee = function(attendee) {
var index = _.findIndex(this.attendees, function(currentAttendee) {
return currentAttendee.email == attendee.email;
});
this.attendees.splice(index, 1);
};
/**
* @function canRemindAttendeesByEmail
* @memberof Component.prototype
@@ -12,6 +12,15 @@ md-chips {
.md-chip-content {
max-width: initial; // fix bug in ng-material
}
// Custom 'chip remove' button used with chips in readonly mode
.sg-chip-remove {
&:hover {
cursor: pointer;
}
height: $chip-delete-icon-size;
width: $chip-delete-icon-size;
line-height: $chip-delete-icon-size;
}
}
}
}