correct placement of baseUrl variable, use it to configure requirejs

This commit is contained in:
David Baumgold
2013-10-09 11:26:34 -04:00
parent e53680bb92
commit 8906cffb22
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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'/>