Stripe indicator is late to the party

Fixes #1737
The AJAX events may fire before document.ready has executed, leaving $.oc.stripeLoadIndicator as null and throwing an error
This commit is contained in:
Samuel Georges 2016-02-13 16:04:16 +11:00
parent 337cf36150
commit ea0127afcf
2 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,9 @@
.append($('<div />').addClass('stripe-loaded'))
this.stripe = this.indicator.find('.stripe')
$(document.body).append(this.indicator)
$(document).ready(function(){
$(document.body).append(this.indicator)
})
}
StripeLoadIndicator.prototype.show = function() {
@ -57,9 +59,7 @@
}
}
$(document).ready(function(){
$.oc.stripeLoadIndicator = new StripeLoadIndicator()
})
$.oc.stripeLoadIndicator = new StripeLoadIndicator()
// STRIPE LOAD INDICATOR DATA-API
// ==============

View File

@ -22,7 +22,9 @@
.append($('<div />').addClass('stripe-loaded'))
this.stripe = this.indicator.find('.stripe')
$(document.body).append(this.indicator)
$(document).ready(function(){
$(document.body).append(this.indicator)
})
}
StripeLoadIndicator.prototype.show = function() {
@ -49,9 +51,7 @@
}
}
$(document).ready(function(){
$.oc.stripeLoadIndicator = new StripeLoadIndicator()
})
$.oc.stripeLoadIndicator = new StripeLoadIndicator()
// STRIPE LOAD INDICATOR DATA-API
// ==============