Fix load time dependency issues
Leigh has been reporting load time issues off and on in Jacks for some time now. These have been extremely hard to reproduce and though I've managed to fix some of them, getting this problem fixed once and for all has proved elusive.
In order to resolve these intermittent issues, I am using PHP to ensure that all dependencies are included and in the correct order. This helped to resolve similar issues we have seen with the main site using 'RequireJS' and other in-JavaScript mechanisms to let JavaScript load other JavaScript. After I am finished, RequireJS will be removed from use in Jacks entirely just as it has already been removed from the main file. All loading will then be deterministic.
This is done on the new jacksmod code (for example, code for the new image picker). And I am most of the way through doing this on the main Jacks codebase itself. In the future, Jacks and/or jacksmod may be rolled into the main repository. A lot of the motivation for earlier separation (Jacks being used in many contexts) has now gone away. Moving forward, Jacks changes are focused only on integration with the main portal interface.