mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-18 15:25:00 -05:00
b5f3041e42
-Auto-join persistent rooms -Update MUCs list every 30 secs -Server params in the config file
40 lines
938 B
JavaScript
40 lines
938 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.mucListItem,
|
|
classBindings: {
|
|
activeContact: '',
|
|
hasUnread: '',
|
|
joined: '',
|
|
persistent: ''
|
|
},
|
|
textBindings: {
|
|
displayName: '.name',
|
|
displayUnreadCount: '.unread'
|
|
},
|
|
events: {
|
|
'click .name': 'handleClick',
|
|
'click .joinRoom': 'handleJoinRoom',
|
|
'click .leaveRoom': 'handleLeaveRoom'
|
|
},
|
|
render: function () {
|
|
this.renderAndBind({contact: this.model});
|
|
return this;
|
|
},
|
|
handleClick: function (e) {
|
|
app.navigate('groupchat/' + this.model.jid);
|
|
},
|
|
handleJoinRoom: function (e) {
|
|
this.model.join();
|
|
},
|
|
handleLeaveRoom: function (e) {
|
|
this.model.leave();
|
|
}
|
|
});
|