MDL-64348 javascript: change template loading to also load dependencies
authorRyan Wyllie <ryan@moodle.com>
Tue, 11 Dec 2018 03:09:32 +0000 (11:09 +0800)
committerRyan Wyllie <ryan@moodle.com>
Mon, 7 Jan 2019 01:03:06 +0000 (09:03 +0800)
commit2b92891a88388657d5bb0ca27a5f1d59f9eb3e15
tree683f24f28e1d52926284a0b92cce59e19e5cbce7
parentfbbed5c603da036ac12dc11d69c7d497c357d2c1
MDL-64348 javascript: change template loading to also load dependencies

Changed the getTemplate function in templates.js to use the
core_output_load_template_with_dependencies function to load the
requested template and all of the dependencies required to render it.

The dependencies are added to the relevant caches so that when the
template is rendered they aren't re-requested from the server.
lib/amd/build/templates.min.js
lib/amd/src/templates.js