2013-09-16 19:12:00 -04:00
|
|
|
/*global $, app, me*/
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var _ = require('underscore');
|
|
|
|
var HumanView = require('human-view');
|
|
|
|
var templates = require('../templates');
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = HumanView.extend({
|
|
|
|
template: templates.includes.mucListItem,
|
|
|
|
classBindings: {
|
|
|
|
activeContact: '',
|
|
|
|
hasUnread: ''
|
|
|
|
},
|
|
|
|
textBindings: {
|
|
|
|
displayName: '.name',
|
2013-09-25 13:39:57 -04:00
|
|
|
displayUnreadCount: '.unread'
|
2013-09-16 19:12:00 -04:00
|
|
|
},
|
|
|
|
events: {
|
|
|
|
'click': 'handleClick'
|
|
|
|
},
|
|
|
|
render: function () {
|
|
|
|
this.renderAndBind({contact: this.model});
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
handleClick: function () {
|
|
|
|
app.navigate('groupchat/' + this.model.jid);
|
|
|
|
}
|
|
|
|
});
|