Make it easier to reference templates
Whisper.Views can now use templateName to reference the id of the desired template.
This commit is contained in:
parent
239b87a1fa
commit
e402338af7
4 changed files with 11 additions and 5 deletions
|
@ -38,7 +38,7 @@
|
|||
events: {
|
||||
'click .remove': 'removeModel'
|
||||
},
|
||||
template: $('#contact_pill').html(),
|
||||
templateName: 'contact_pill',
|
||||
initialize: function() {
|
||||
var error = this.model.validate(this.model.attributes);
|
||||
if (error) {
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
Whisper.RecipientsInputView = Whisper.View.extend({
|
||||
className: 'recipients-input',
|
||||
template: $('#recipients-input').html(),
|
||||
templateName: 'recipients-input',
|
||||
initialize: function(options) {
|
||||
if (options) {
|
||||
this.placeholder = options.placeholder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue