()
| 80 | } |
| 81 | |
| 82 | initData () { |
| 83 | this.showExpandedProgress = false |
| 84 | this.memberSort = 'nameAsc' |
| 85 | this.stats = {} |
| 86 | this.ladderLevels = [] |
| 87 | this.ladderImageMap = {} |
| 88 | |
| 89 | this.clan = new Clan({ _id: this.clanID }) |
| 90 | if (/^[a-f0-9]{24}$/.test(this.clanID)) { |
| 91 | // We have the clan's actual ID |
| 92 | this.listenTo(this.clan, 'sync', this.onClanSync) |
| 93 | this.loadPostClanData() |
| 94 | } else { |
| 95 | // We have slug, need to get the actual ID before we load the rest |
| 96 | this.listenTo(this.clan, 'sync', () => { |
| 97 | this.clanID = this.clan.id |
| 98 | this.loadPostClanData() |
| 99 | return this.onClanSync() |
| 100 | }) |
| 101 | } |
| 102 | return this.supermodel.loadModel(this.clan, { cache: false }) |
| 103 | } |
| 104 | |
| 105 | loadPostClanData () { |
| 106 | this.campaigns = new CocoCollection([], { url: '/db/campaign', model: Campaign, comparator: '_id' }) |
no test coverage detected