2015-09-07 14:53:43 -07:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
2015-08-04 12:15:37 -07:00
|
|
|
*/
|
|
|
|
(function () {
|
|
|
|
'use strict';
|
|
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
|
2017-06-14 10:38:33 -07:00
|
|
|
// TODO: take a title string which could replace the 'members' header
|
2015-08-04 12:15:37 -07:00
|
|
|
Whisper.GroupMemberList = Whisper.View.extend({
|
2016-03-21 15:37:53 -07:00
|
|
|
className: 'group-member-list panel',
|
2015-12-08 15:01:29 -08:00
|
|
|
templateName: 'group-member-list',
|
2017-06-10 12:18:24 -07:00
|
|
|
initialize: function(options) {
|
2017-06-16 16:48:06 -07:00
|
|
|
this.needVerify = options.needVerify;
|
|
|
|
|
2015-08-04 12:15:37 -07:00
|
|
|
this.render();
|
2017-06-10 12:18:24 -07:00
|
|
|
|
2015-09-03 13:33:17 -07:00
|
|
|
this.member_list_view = new Whisper.ContactListView({
|
2017-06-13 17:36:32 -07:00
|
|
|
collection: this.model,
|
2017-06-10 12:18:24 -07:00
|
|
|
className: 'members',
|
|
|
|
toInclude: {
|
|
|
|
listenBack: options.listenBack
|
|
|
|
}
|
2015-08-04 12:15:37 -07:00
|
|
|
});
|
|
|
|
this.member_list_view.render();
|
2017-06-13 17:36:32 -07:00
|
|
|
|
2016-03-21 15:37:53 -07:00
|
|
|
this.$('.container').append(this.member_list_view.el);
|
2015-08-04 12:15:37 -07:00
|
|
|
},
|
2017-06-16 16:48:06 -07:00
|
|
|
render_attributes: function() {
|
|
|
|
var summary;
|
|
|
|
if (this.needVerify) {
|
|
|
|
summary = i18n('membersNeedingVerification');
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
members: i18n('groupMembers'),
|
|
|
|
summary: summary
|
|
|
|
};
|
2016-03-23 15:06:22 -07:00
|
|
|
}
|
2015-08-04 12:15:37 -07:00
|
|
|
});
|
|
|
|
})();
|