mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Added rough draft of subscribe button in gem shop.
This commit is contained in:
parent
616940cafb
commit
7b34f90230
3 changed files with 21 additions and 0 deletions
app
styles/play/modal
templates/play/modal
views/play/modal
|
@ -87,3 +87,13 @@
|
|||
width: 80%
|
||||
top: 20px
|
||||
border: 5px solid gray
|
||||
|
||||
#or-subscribe
|
||||
position: absolute
|
||||
right: 30px
|
||||
top: 420px
|
||||
font-size: 16px
|
||||
color: #eee
|
||||
|
||||
button
|
||||
min-width: 182px
|
||||
|
|
|
@ -40,3 +40,8 @@
|
|||
|
||||
div#close-modal
|
||||
span.glyphicon.glyphicon-remove
|
||||
|
||||
#or-subscribe
|
||||
span Or 3500 gems/mo if you...
|
||||
br
|
||||
button.start-subscription-button.btn.btn-lg.btn-illustrated.btn-success(data-i18n="subscribe.subscribe") Subscribe
|
||||
|
|
|
@ -2,6 +2,7 @@ ModalView = require 'views/core/ModalView'
|
|||
template = require 'templates/play/modal/buy-gems-modal'
|
||||
stripeHandler = require 'core/services/stripe'
|
||||
utils = require 'core/utils'
|
||||
SubscribeModal = require 'views/core/SubscribeModal'
|
||||
|
||||
module.exports = class BuyGemsModal extends ModalView
|
||||
id: 'buy-gems-modal'
|
||||
|
@ -22,6 +23,7 @@ module.exports = class BuyGemsModal extends ModalView
|
|||
events:
|
||||
'click .product button': 'onClickProductButton'
|
||||
'click #close-modal': 'hide'
|
||||
'click .start-subscription-button': 'onClickStartSubscription'
|
||||
|
||||
constructor: (options) ->
|
||||
super(options)
|
||||
|
@ -111,3 +113,7 @@ module.exports = class BuyGemsModal extends ModalView
|
|||
purchased.gems += product.gems
|
||||
me.set('purchased', purchased)
|
||||
@hide()
|
||||
|
||||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'buy gems modal'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue