Switching over to building the table with JS — wp.template.
We are now using the same JS template for existing rows and newly
generated rows on the fly — this should simplify things moving forward.
I’ve also started building stuff in an external JS file rather than
straight on the page. Will continue migrating things to it and
localizing as needed.
Saved ( 2 * displayed tax rates - 1 ) db queries per page load by doing
the locations all in one query and then parceling them out in php.
More coming.
This is by no means complete. A number of things need to be relocated
and optimized still, but it does a rough search, purely in JS, and
highlights the results in yellow.
There’s a lot of them, so I’m breaking them into multiple commits.
This is safeguarding stuff in case some translation uses a double
quote, it will no longer risk breaking out of the attribute.