correct placement of baseUrl variable, use it to configure requirejs
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
// See https://edx-wiki.atlassian.net/wiki/display/LMS/Integration+of+Require+JS+into+the+system
|
||||
(function (requirejs, require, define) {
|
||||
|
||||
// HACK: this should be removed when it is safe to do so
|
||||
if(window.baseUrl) {
|
||||
requirejs.config({baseUrl: baseUrl});
|
||||
}
|
||||
|
||||
// The current JS file will be loaded and run each time. It will require a
|
||||
// single dependency which will be loaded and stored by RequireJS. On
|
||||
// subsequent runs, RequireJS will return the dependency from memory, rather
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
if (window.location !== window.top.location) {
|
||||
window.top.location = window.location;
|
||||
}
|
||||
window.baseUrl = "${settings.STATIC_URL}";
|
||||
})(this);
|
||||
</script>
|
||||
% endif
|
||||
@@ -96,6 +95,7 @@
|
||||
<%include file="footer.html" />
|
||||
% endif
|
||||
|
||||
<script>window.baseUrl = "${settings.STATIC_URL}";</script>
|
||||
<%static:js group='application'/>
|
||||
<%static:js group='module-js'/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user