| 103 | } |
| 104 | |
| 105 | refreshNames (clans) { |
| 106 | let clanIDs = _.filter(clans, clan => clan.get('type') === 'public') |
| 107 | clanIDs = _.filter(_.map(clans, clan => clan.get('ownerID'))) |
| 108 | const options = { |
| 109 | url: '/db/user/-/names', |
| 110 | method: 'POST', |
| 111 | data: { ids: clanIDs }, |
| 112 | success: (models, response, options) => { |
| 113 | for (const userID in models) { this.idNameMap[userID] = models[userID].name } |
| 114 | return (typeof this.render === 'function' ? this.render() : undefined) |
| 115 | } |
| 116 | } |
| 117 | return this.supermodel.addRequestResource('user_names', options, 0).load() |
| 118 | } |
| 119 | |
| 120 | setupPrivateInfoPopover () { |
| 121 | const popoverTitle = '<h3>' + $.i18n.t('clans.private_clans') + '</h3>' |