get frontend rendering with new markup/css
This commit is contained in:
parent
518bdb2056
commit
95c31629b7
6 changed files with 51 additions and 22 deletions
|
@ -5,7 +5,7 @@ var Whisper = Whisper || {};
|
|||
|
||||
Whisper.MessageView = Backbone.View.extend({
|
||||
tagName: "li",
|
||||
className: "message",
|
||||
className: "entry",
|
||||
|
||||
initialize: function() {
|
||||
this.$el.addClass(this.model.get('type'));
|
||||
|
@ -21,9 +21,10 @@ var Whisper = Whisper || {};
|
|||
render: function() {
|
||||
this.$el.html(
|
||||
Mustache.render(this.template, {
|
||||
body: this.model.get('body'),
|
||||
message: this.model.get('body'),
|
||||
date: this.formatTimestamp(),
|
||||
attachments: this.model.get('attachments')
|
||||
attachments: this.model.get('attachments'),
|
||||
bubble_class: this.model.get('type') === 'outgoing' ? 'sent' : 'incoming'
|
||||
})
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue