signal-desktop/js/views/group_member_list_view.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

/*
* vim: ts=4:sw=4:expandtab
2015-08-04 19:15:37 +00:00
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
// TODO: take a title string which could replace the 'members' header
2015-08-04 19:15:37 +00:00
Whisper.GroupMemberList = Whisper.View.extend({
className: 'group-member-list panel',
templateName: 'group-member-list',
initialize: function(options) {
this.needVerify = options.needVerify;
2015-08-04 19:15:37 +00:00
this.render();
this.member_list_view = new Whisper.ContactListView({
collection: this.model,
className: 'members',
toInclude: {
listenBack: options.listenBack
}
2015-08-04 19:15:37 +00:00
});
this.member_list_view.render();
this.$('.container').append(this.member_list_view.el);
2015-08-04 19:15:37 +00:00
},
render_attributes: function() {
var summary;
if (this.needVerify) {
summary = i18n('membersNeedingVerification');
}
return {
members: i18n('groupMembers'),
summary: summary
};
}
2015-08-04 19:15:37 +00:00
});
})();