* VRFS-3268 - make bugsnag and recurly async
This commit is contained in:
parent
8e75465ccd
commit
2cb01d8492
|
|
@ -10,6 +10,7 @@
|
|||
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
||||
// GO AFTER THE REQUIRES BELOW.
|
||||
//
|
||||
//= require bugsnag
|
||||
//= require bind-polyfill
|
||||
//= require jquery
|
||||
//= require jquery.monkeypatch
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@
|
|||
displayTax(effectiveQuantity, unitTax, 1.99 + unitTax)
|
||||
}
|
||||
else {
|
||||
|
||||
checkoutUtils.configureRecurly()
|
||||
var pricing = context.recurly.Pricing();
|
||||
pricing.plan_code = gon.recurly_tax_estimate_jam_track_plan;
|
||||
pricing.resolved = false;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class CheckoutUtils
|
|||
@rest = new context.JK.Rest();
|
||||
@cookie_name = "preserve_billing"
|
||||
@lastPurchaseResponse = null
|
||||
@configuredRecurly = false
|
||||
|
||||
init: () =>
|
||||
|
||||
|
|
@ -54,5 +55,10 @@ class CheckoutUtils
|
|||
|
||||
return carts[0].product_info.free
|
||||
|
||||
configureRecurly: () =>
|
||||
unless @configuredRecurly
|
||||
context.recurly.configure(gon.global.recurly_public_api_key)
|
||||
@configuredRecurly = true
|
||||
|
||||
# global instance
|
||||
context.JK.CheckoutUtilsInstance = new CheckoutUtils()
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
//= require bugsnag
|
||||
//= require jquery
|
||||
//= require jquery.queryparams
|
||||
//= require AAA_Log
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//= require bugsnag
|
||||
//= require bind-polyfill
|
||||
//= require jquery
|
||||
//= require jquery.monkeypatch
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//= require bugsnag
|
||||
//= require bind-polyfill
|
||||
//= require jquery
|
||||
//= require jquery.monkeypatch
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@
|
|||
<%= stylesheet_link_tag "client/search", media: "all" %>
|
||||
<%= stylesheet_link_tag "client/ftue", media: "all" %>
|
||||
<%= stylesheet_link_tag "client/createSession", media: "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<meta name="description" content="<%= meta_description(yield(:description)) %>">
|
||||
<%= include_gon %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@
|
|||
<![endif]-->
|
||||
<!--<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>-->
|
||||
<%= stylesheet_link_tag "client/client", media: "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<%= include_gon %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@
|
|||
<!--<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<%= stylesheet_link_tag "corp/corporate", :media => "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<%= include_gon(:init => true) %>
|
||||
<%= javascript_include_tag "corp/corporate" %>
|
||||
<%= csrf_meta_tags %>
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@
|
|||
<![endif]-->
|
||||
<!--<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>-->
|
||||
<%= stylesheet_link_tag "landing/landing", media: "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<%= include_gon(:init => true) %>
|
||||
<%= csrf_meta_tags %>
|
||||
<meta name="description" content="<%= meta_description(yield(:description)) %>">
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@
|
|||
<![endif]-->
|
||||
<!--<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>-->
|
||||
<%= stylesheet_link_tag "minimal/minimal", media: "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<%= include_gon(:init => true) %>
|
||||
<%= csrf_meta_tags %>
|
||||
<meta name="description" content="<%= meta_description(yield(:description)) %>">
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@
|
|||
<![endif]-->
|
||||
<!--<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>-->
|
||||
<%= stylesheet_link_tag "web/web", media: "all" %>
|
||||
<% if bugsnag? %>
|
||||
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
|
||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
|
||||
<% end %>
|
||||
<%= include_gon(:init => true) %>
|
||||
<%= csrf_meta_tags %>
|
||||
<meta name="description" content="<%= meta_description(yield(:description)) %>">
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
script src="https://apis.google.com/js/platform.js" async defer
|
||||
script src="https://apis.google.com/js/platform.js" async="async" defer="defer"
|
||||
|
|
@ -1 +1 @@
|
|||
script src="https://www.google.com/recaptcha/api.js" async defer
|
||||
script src="https://www.google.com/recaptcha/api.js" async="async" defer="defer"
|
||||
|
|
@ -1,4 +1 @@
|
|||
script src="https://js.recurly.com/v3/recurly.js"
|
||||
|
||||
javascript:
|
||||
recurly.configure(gon.global.recurly_public_api_key)
|
||||
script src="https://js.recurly.com/v3/recurly.js" async="async" defer="defer"
|
||||
|
|
@ -19,4 +19,5 @@ Gon.global.estimate_taxes = Rails.application.config.estimate_taxes
|
|||
Gon.global.web_performance_timing_enabled = Rails.application.config.web_performance_timing_enabled
|
||||
Gon.global.jamtrack_landing_bubbles_enabled = Rails.application.config.jamtrack_landing_bubbles_enabled
|
||||
Gon.global.jamtrack_browser_bubbles_enabled = Rails.application.config.jamtrack_browser_bubbles_enabled
|
||||
Gon.global.bugsnag_key = Rails.application.config.bugsnag_key
|
||||
Gon.global.env = Rails.env
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue