| 19 | module.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) |