MCPcopy Create free account
hub / github.com/codecombat/codecombat / initClass

Method initClass

app/views/play/modal/BuyGemsModal.js:21–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19module.exports = (BuyGemsModal = (function () {
20 BuyGemsModal = class BuyGemsModal extends ModalView {
21 static initClass () {
22 this.prototype.id =
23 (me.get('preferredLanguage', true) || 'en-US').split('-')[0] === 'nl'
24 ? 'buy-gems-modal-nl'
25 : 'buy-gems-modal'
26 this.prototype.template = template
27 this.prototype.plain = true
28
29 this.prototype.subscriptions = {
30 'ipad:products': 'onIPadProducts',
31 'ipad:iap-complete': 'onIAPComplete',
32 'stripe:received-token': 'onStripeReceivedToken'
33 }
34
35 this.prototype.events = {
36 'click .product button:not(.start-subscription-button)': 'onClickProductButton',
37 'click #close-modal': 'hide',
38 'click .start-subscription-button': 'onClickStartSubscription'
39 }
40 }
41
42 constructor (options) {
43 super(options)

Callers 1

BuyGemsModal.jsFile · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected