I've uploaded a patch here that cleans up the JavaScript that was being served within javascript-static.
This is done in several methods:
1. A couple of functions that were being used by only one module have been moved to JS files being included by those modules only
2. Several functions that were only being used by formslib have been split into a separate file lib/form/form.js
at the same time I also tidied up the JavaScript that formslib was serving in the corresponding places.
3. Deprecated a couple of JavaScript functions that weren't being used within Moodle at all.
4. Changed javascript-static to load in the page footer rather than the head
5. Created javascript-static-priority and moved several functions that were required (within at least one call) to be loaded in the head into javascript-static-priority and made output-render load the file in head.
If someone could please have a look at this patch and let me know if it is OK to commit that would be fantastic.
Cheers
Sam
I've uploaded a patch here that cleans up the JavaScript that was being served within javascript-static.
This is done in several methods:
1. A couple of functions that were being used by only one module have been moved to JS files being included by those modules only
2. Several functions that were only being used by formslib have been split into a separate file lib/form/form.js
at the same time I also tidied up the JavaScript that formslib was serving in the corresponding places.
3. Deprecated a couple of JavaScript functions that weren't being used within Moodle at all.
4. Changed javascript-static to load in the page footer rather than the head
5. Created javascript-static-priority and moved several functions that were required (within at least one call) to be loaded in the head into javascript-static-priority and made output-render load the file in head.
If someone could please have a look at this patch and let me know if it is OK to commit that would be fantastic.
Cheers
Sam