1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-08-13 17:03:51 -04:00
kaiwa/clientapp/views/contactListItem.js
Sebastien Hut b5f3041e42 Persistent MUC and server params
-Auto-join persistent rooms
-Update MUCs list every 30 secs
-Server params in the config file
2015-02-09 16:29:16 +01:00

39 lines
842 B
JavaScript

/*global $, app, me*/
"use strict";
var _ = require('underscore');
var HumanView = require('human-view');
var templates = require('../templates');
module.exports = HumanView.extend({
template: templates.includes.contactListItem,
classBindings: {
show: '',
subscription: '',
chatState: '',
activeContact: '',
hasUnread: '',
idle: '',
persistent: ''
},
textBindings: {
displayName: '.name',
status: '.status',
displayUnreadCount: '.unread'
},
srcBindings: {
avatar: '.avatar'
},
events: {
'click': 'handleClick'
},
render: function () {
this.renderAndBind({contact: this.model});
return this;
},
handleClick: function () {
app.navigate('chat/' + this.model.jid);
}
});