2013-12-31 18:10:46 -05: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.mucRosterItem,
|
2015-02-26 16:59:05 -05:00
|
|
|
events: {
|
|
|
|
'click': 'handleClick'
|
|
|
|
},
|
2013-12-31 18:10:46 -05:00
|
|
|
classBindings: {
|
|
|
|
show: '',
|
|
|
|
chatState: '',
|
|
|
|
idle: ''
|
|
|
|
},
|
|
|
|
textBindings: {
|
|
|
|
mucDisplayName: '.name'
|
|
|
|
},
|
|
|
|
render: function () {
|
|
|
|
this.renderAndBind({contact: this.model});
|
|
|
|
return this;
|
2015-02-26 16:59:05 -05:00
|
|
|
},
|
|
|
|
handleClick: function (e) {
|
|
|
|
this.parent.trigger('rosterItemClicked', this.model.mucDisplayName);
|
2013-12-31 18:10:46 -05:00
|
|
|
}
|
|
|
|
});
|