Page MenuHome

Move looper's javascript files
ClosedPublic

Authored by Anna Sirota (railla) on Feb 16 2021, 5:29 PM.

Details

Summary
  • Moves looper-specific reusable JS into a static dir under looper;
  • Makes sure that everywhere DropIn JS is included, data collector JS is also included (it should have been included when 3DSecure changes were introduced, but I seem to have missed a few templates).

Diff Detail

Event Timeline

Anna Sirota (railla) requested review of this revision.Feb 16 2021, 5:29 PM
Anna Sirota (railla) created this revision.
This revision is now accepted and ready to land.Feb 18 2021, 11:42 AM

Makes sure that everywhere DropIn JS is included, data collector JS is also included (it should have been included when 3DSecure changes were introduced, but I seem to have missed a few templates).

At some point this should really become its own template tag, or something like that, so that these issues don't happen any more. Upgrading the JS to a new version is now also a hassle. Doesn't have to be done in this patch, though.

Makes sure that everywhere DropIn JS is included, data collector JS is also included (it should have been included when 3DSecure changes were introduced, but I seem to have missed a few templates).

At some point this should really become its own template tag, or something like that, so that these issues don't happen any more. Upgrading the JS to a new version is now also a hassle. Doesn't have to be done in this patch, though.

I've been thinking about how to make this better: considered using django-pipeline to turn it into {% javascript 'braintree-dropin' %}, but there's no nice way to make it *just* concatenate already minified vendor JS, so it leaves something like {% include "looper/braintree_static.html" %} which is less nice but better than copy-pasting.
Will do that in a later patch, yes.