Group update recipient typeahead excludes exisiting members
Fixes #199 // FREEBIE
This commit is contained in:
parent
694f801676
commit
e9e875766f
1 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,13 @@
|
||||||
this.recipients_view = new Whisper.RecipientsInputView({
|
this.recipients_view = new Whisper.RecipientsInputView({
|
||||||
placeholder: "Add member"
|
placeholder: "Add member"
|
||||||
});
|
});
|
||||||
|
this.listenTo(this.recipients_view.typeahead, 'sync', function() {
|
||||||
|
this.model.contactCollection.models.forEach(function(model) {
|
||||||
|
if (this.recipients_view.typeahead.get(model)) {
|
||||||
|
this.recipients_view.typeahead.remove(model);
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
|
});
|
||||||
this.$('.scrollable').append(this.recipients_view.el);
|
this.$('.scrollable').append(this.recipients_view.el);
|
||||||
|
|
||||||
this.$('.avatar').addClass('default');
|
this.$('.avatar').addClass('default');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue