Add items to conversation history when user verifies/unverifies
FREEBIE
This commit is contained in:
parent
02973372aa
commit
1cf9289b1a
12 changed files with 168 additions and 4 deletions
|
@ -98,6 +98,37 @@
|
|||
}
|
||||
});
|
||||
|
||||
Whisper.VerifiedChangeView = Whisper.View.extend({
|
||||
tagName: 'li',
|
||||
className: 'verified-change',
|
||||
templateName: 'verified-change',
|
||||
id: function() {
|
||||
return this.model.id;
|
||||
},
|
||||
initialize: function() {
|
||||
this.conversation = this.model.getModelForVerifiedChange();
|
||||
},
|
||||
events: {
|
||||
'click .content': 'showIdentity'
|
||||
},
|
||||
render_attributes: function() {
|
||||
if (this.model.get('verified')) {
|
||||
return {
|
||||
icon: 'verified',
|
||||
content: i18n('youMarkedAsVerified', this.conversation.getTitle())
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
icon: 'shield',
|
||||
content: i18n('youMarkedAsNotVerified', this.conversation.getTitle())
|
||||
};
|
||||
},
|
||||
showIdentity: function() {
|
||||
this.$el.trigger('show-identity', this.conversation);
|
||||
}
|
||||
});
|
||||
|
||||
Whisper.MessageView = Whisper.View.extend({
|
||||
tagName: 'li',
|
||||
templateName: 'message',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue