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