mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Support custom placeholder on recipients input
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
window: options.window
|
||||
});
|
||||
|
||||
this.recipients_view = new Whisper.RecipientsInputView();
|
||||
this.recipients_view = new Whisper.RecipientsInputView({
|
||||
placeholder: "Add member"
|
||||
});
|
||||
this.$('.scrollable').append(this.recipients_view.el);
|
||||
this.$('.avatar').addClass('default');
|
||||
},
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user