1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-14 21:45:08 -05:00
kaiwa/clientapp/views/contactListItem.js
2013-08-29 22:37:24 -07:00

34 lines
703 B
JavaScript

/*global $, app, me*/
"use strict";
var _ = require('underscore');
var StrictView = require('strictview');
var templates = require('../templates');
module.exports = StrictView.extend({
template: templates.includes.contactListItem,
classBindings: {
show: '',
subscription: '',
chatState: ''
},
textBindings: {
displayName: '.name',
status: '.status'
},
srcBindings: {
avatar: '.avatar'
},
events: {
'click': 'goChat'
},
render: function () {
this.renderAndBind({contact: this.model});
return this;
},
goChat: function () {
app.navigate('chat/' + this.model.jid);
}
});