1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-08-13 17:03:51 -04:00
kaiwa/clientapp/views/message.js

31 lines
683 B
JavaScript
Raw Normal View History

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');
var HumanView = require('human-view');
2013-08-29 23:38:28 -04:00
var templates = require('../templates');
2013-08-20 13:45:06 -04:00
module.exports = HumanView.extend({
2013-08-20 13:45:06 -04:00
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',
2013-09-16 05:19:07 -04:00
receiptReceived: '.message',
pending: '.message',
2013-09-16 05:19:07 -04:00
delayed: '.message',
2013-12-16 17:28:13 -05:00
edited: '.message',
meAction: '.message'
2013-08-20 13:45:06 -04:00
},
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;
}
});