2013-08-20 13:45:06 -04:00
|
|
|
/*global $*/
|
2013-08-29 23:38:28 -04:00
|
|
|
"use strict";
|
|
|
|
|
2013-08-20 13:45:06 -04:00
|
|
|
var _ = require('underscore');
|
2013-08-29 23:38:28 -04:00
|
|
|
var StrictView = require('strictview');
|
|
|
|
var templates = require('../templates');
|
2013-08-20 13:45:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
module.exports = StrictView.extend({
|
|
|
|
template: templates.includes.message,
|
2013-08-29 23:38:28 -04:00
|
|
|
initialize: function (opts) {
|
|
|
|
this.render();
|
|
|
|
},
|
2013-08-20 13:45:06 -04:00
|
|
|
classBindings: {
|
|
|
|
mine: '.message',
|
|
|
|
receiptReceived: '',
|
|
|
|
acked: '',
|
|
|
|
delayed: '',
|
|
|
|
edited: ''
|
|
|
|
},
|
2013-08-29 23:38:28 -04:00
|
|
|
textBindings: {
|
2013-08-20 13:45:06 -04:00
|
|
|
body: '.body',
|
|
|
|
formattedTime: '.timestamp'
|
|
|
|
},
|
|
|
|
render: function () {
|
2013-08-29 23:38:28 -04:00
|
|
|
this.renderAndBind({message: this.model});
|
2013-08-20 13:45:06 -04:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
});
|