Optimize edxnotes files.

This commit is contained in:
cahrens
2015-06-27 07:15:48 -04:00
parent ad16f9f968
commit 497d76fa54
11 changed files with 52 additions and 51 deletions

View File

@@ -60,7 +60,11 @@ source, template_path = _loader.load_template_source(path)
${caller.body()}
});
% else:
require(['${staticfiles_storage.url(module_name + ".js")}'], function () {
## The "raw" parameter is specified to avoid the URL from being further maninpulated by
## static_replace calls (as woudl happen if require_module is used within courseware).
## Without specifying "raw", a call to static_replace would result in the MD5 hash being
## being appended more than once, causing the import to fail in production environments.
require(['${staticfiles_storage.url(module_name + ".js") + "?raw"}'], function () {
require(['${module_name}'], function (${class_name}) {
${caller.body()}
});