* VRFS-3208 - add new config - purchases_enabled, so that we can stop purchases if needed
This commit is contained in:
parent
c8142c9b0f
commit
b523850296
|
|
@ -140,14 +140,19 @@
|
|||
$orderPrompt.addClass('hidden')
|
||||
$emptyCartPrompt.removeClass('hidden')
|
||||
$noAccountInfoPrompt.addClass('hidden')
|
||||
$placeOrder.addClass('disabled')
|
||||
$placeOrder.addClass('disabled').unbind('click').on('click', false)
|
||||
}
|
||||
else {
|
||||
logger.debug("cart has " + carts.length + " items in it")
|
||||
$orderPrompt.removeClass('hidden')
|
||||
$emptyCartPrompt.addClass('hidden')
|
||||
$noAccountInfoPrompt.addClass('hidden')
|
||||
$placeOrder.removeClass('disabled').on('click', placeOrder)
|
||||
if(gon.global.purchases_enabled) {
|
||||
$placeOrder.removeClass('disabled').unbind('click').on('click', placeOrder)
|
||||
}
|
||||
else {
|
||||
$placeOrder.addClass('disabled').unbind('click').on('click', false)
|
||||
}
|
||||
|
||||
var planPricing = {}
|
||||
|
||||
|
|
@ -319,7 +324,7 @@
|
|||
var navigationHtml = $(
|
||||
context._.template(
|
||||
$('#template-checkout-navigation').html(),
|
||||
{current: step},
|
||||
{current: step, purchases_disable_class: gon.global.purchases_enabled ? 'hidden' : ''},
|
||||
{variable: 'data'}
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@
|
|||
var navigationHtml = $(
|
||||
context._.template(
|
||||
$('#template-checkout-navigation').html(),
|
||||
{current: step},
|
||||
{current: step, purchases_disable_class: gon.global.purchases_enabled ? 'hidden' : ''},
|
||||
{variable: 'data'}
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
var navigationHtml = $(
|
||||
context._.template(
|
||||
$('#template-checkout-navigation').html(),
|
||||
{current: 1},
|
||||
{current: 1, purchases_disable_class: gon.global.purchases_enabled ? 'hidden' : ''},
|
||||
{variable: 'data'}
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,25 @@
|
|||
|
||||
.checkout-navigation {
|
||||
padding: 20px 0px;
|
||||
position:relative;
|
||||
|
||||
.purchases-disabled {
|
||||
position:absolute;
|
||||
bottom:-5px;
|
||||
width:530px;
|
||||
background-color:#006673;
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
border-color:white;
|
||||
text-align:center;
|
||||
color:white;
|
||||
left:30px;
|
||||
padding: 1px 0;
|
||||
|
||||
&.hidden {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
.nav-signin, .nav-payment-info, .nav-place-order {
|
||||
margin-right:50px;
|
||||
float: left;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@
|
|||
text-align:left;
|
||||
}
|
||||
|
||||
.purchases-disabled {
|
||||
bottom: -15px;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
margin-top:20px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ div layout="screen" layout-id="checkoutSignin" id="checkoutSignInScreen" class="
|
|||
|
||||
script type='text/template' id='template-checkout-navigation'
|
||||
.checkout-navigation
|
||||
.purchases-disabled class="{{data.purchases_disable_class}}"
|
||||
| Purchases are currently disabled. Please check back soon!
|
||||
.nav-signin
|
||||
= "{% if (data.current == 1) { %}"
|
||||
.nav-text.selected
|
||||
|
|
|
|||
|
|
@ -306,7 +306,8 @@ if defined?(Bundler)
|
|||
|
||||
config.recordings_stale_time = 3 # num days of inactivity before we decide that a recording is no longer going to be claimed
|
||||
|
||||
config.jam_tracks_available = false
|
||||
config.jam_tracks_available = true
|
||||
config.purchases_enabled = true
|
||||
|
||||
# these values work out of the box with default settings of an influx install (you do have to add a development database by hand though)
|
||||
config.influxdb_database = 'development'
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ SampleApp::Application.configure do
|
|||
config.youtube_developer_key = "AI39si5bPqiNc5GQHscWJh9Wl1WTAr9aZqr_YncUvaR7Kz0rgPdBVWVubHZ94xZ3KLIBqtE9mu3VZe-UpMU80QxXoC66kBNp7A"
|
||||
config.youtube_app_name = "JamKazamDev"
|
||||
config.jam_tracks_available=true
|
||||
config.purchases_enabled=true
|
||||
config.minimal_curtain = true
|
||||
config.video_available= ENV['VIDEO_AVAILABILITY'] || "none"
|
||||
config.email_generic_from = 'nobody-dev@jamkazam.com'
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ Gon.global.recurly_public_api_key = Rails.application.config.recurly_public_api_
|
|||
Gon.global.one_free_jamtrack_per_user = Rails.application.config.one_free_jamtrack_per_user
|
||||
Gon.global.video_available = Rails.application.config.video_available
|
||||
Gon.global.gear_check_ignore_high_latency = Rails.application.config.gear_check_ignore_high_latency
|
||||
Gon.global.purchases_enabled = Rails.application.config.purchases_enabled
|
||||
Gon.global.env = Rails.env
|
||||
|
|
|
|||
Loading…
Reference in New Issue