mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-12-26 01:18:59 -05:00
30 lines
651 B
JavaScript
30 lines
651 B
JavaScript
/*global $*/
|
|
"use strict";
|
|
|
|
var _ = require('underscore');
|
|
var HumanView = require('human-view');
|
|
var templates = require('../templates');
|
|
|
|
|
|
module.exports = HumanView.extend({
|
|
template: templates.includes.message,
|
|
initialize: function (opts) {
|
|
this.render();
|
|
},
|
|
classBindings: {
|
|
mine: '.message',
|
|
receiptReceived: '.message',
|
|
acked: '.message',
|
|
delayed: '.message',
|
|
edited: '.message'
|
|
},
|
|
textBindings: {
|
|
body: '.body',
|
|
formattedTime: '.timestamp'
|
|
},
|
|
render: function () {
|
|
this.renderAndBind({message: this.model});
|
|
return this;
|
|
}
|
|
});
|