Clean up shared compose/group update ui

Makes the groupupdate and recipient input fields stick to the top,
restyles the typeahead as a floating dropdown list of suggestions
rather than a full width component, fixes group avatar thumbnail
rendering.

// FREEBIE
This commit is contained in:
lilia 2015-09-04 13:11:21 -07:00
parent e402338af7
commit 24a18e91b3
9 changed files with 150 additions and 143 deletions

View file

@ -58,6 +58,15 @@
itemView: Whisper.ContactPillView
});
Whisper.SuggestionView = Whisper.ConversationListItemView.extend({
className: 'contact-details contact',
templateName: 'contact_name_and_number',
});
Whisper.SuggestionListView = Whisper.ConversationListView.extend({
itemView: Whisper.SuggestionView
});
Whisper.RecipientsInputView = Whisper.View.extend({
className: 'recipients-input',
templateName: 'recipients-input',
@ -85,7 +94,7 @@
this.typeahead.fetchContacts();
// View to display the matched contacts from typeahead
this.typeahead_view = new Whisper.ConversationListView({
this.typeahead_view = new Whisper.SuggestionListView({
collection : new Whisper.ConversationCollection([], {
comparator: function(m) { return m.getTitle().toLowerCase(); }
})
@ -176,7 +185,7 @@
resetTypeahead: function() {
this.new_contact_view.$el.hide();
this.$input.val('').focus();
this.typeahead_view.collection.reset(this.typeahead.models);
this.typeahead_view.collection.reset([]);
},