(e)
| 2273 | } |
| 2274 | |
| 2275 | onClickModulePortal (e) { |
| 2276 | e.preventDefault() |
| 2277 | e.stopPropagation() |
| 2278 | if (this.editorMode) { return } |
| 2279 | const $target = $(e.currentTarget) |
| 2280 | const moduleSlug = $target.data('module-slug') |
| 2281 | if (!moduleSlug) { return } |
| 2282 | if ($target.hasClass('locked')) { |
| 2283 | const lockReason = $target.data('lock-reason') |
| 2284 | if (lockReason === 'need-premium') { |
| 2285 | return this.promptForSubscription(moduleSlug, 'locked module clicked') |
| 2286 | } |
| 2287 | return |
| 2288 | } |
| 2289 | Backbone.Mediator.publish('router:navigate', { |
| 2290 | route: `/play/${moduleSlug}`, |
| 2291 | viewClass: CampaignView, |
| 2292 | viewArgs: [{ supermodel: this.supermodel }, moduleSlug], |
| 2293 | }) |
| 2294 | } |
| 2295 | |
| 2296 | onClickCampaignSwitch (e) { |
| 2297 | const campaignSlug = $(e.target).data('campaign-slug') |
nothing calls this directly
no test coverage detected