Support custom placeholder on recipients input
This commit is contained in:
parent
9795b26bc1
commit
23db5802cf
3 changed files with 12 additions and 3 deletions
|
@ -58,7 +58,10 @@
|
|||
Whisper.RecipientsInputView = Whisper.View.extend({
|
||||
className: 'recipients-input',
|
||||
template: $('#recipients-input').html(),
|
||||
initialize: function() {
|
||||
initialize: function(options) {
|
||||
if (options) {
|
||||
this.placeholder = options.placeholder;
|
||||
}
|
||||
this.render();
|
||||
this.$input = this.$('input.search');
|
||||
this.$new_contact = this.$('.new-contact');
|
||||
|
@ -89,6 +92,10 @@
|
|||
this.initNewContact();
|
||||
},
|
||||
|
||||
render_attributes: function() {
|
||||
return { placeholder: this.placeholder || "Name or phone number" };
|
||||
},
|
||||
|
||||
events: {
|
||||
'change input.search': 'filterContacts',
|
||||
'keyup input.search': 'filterContacts',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue