Wait for specific javascript variables rather than requirejs loading on the unit page

This commit is contained in:
Calen Pennington
2018-04-10 16:01:49 -04:00
parent 5474ec0a8f
commit 04a5d3c7c6

View File

@@ -36,11 +36,6 @@ REQUIREJS_WAIT = {
"jquery", "js/base", "js/models/course", "js/models/settings/advanced",
"js/views/settings/advanced", "codemirror"],
# Unit page
re.compile(r'^Unit \|'): [
"jquery", "js/base", "js/models/xblock_info", "js/views/pages/container",
"js/collections/component_template", "xmodule", "cms/js/main", "xblock/cms.runtime.v1"],
# Content - Outline
# Note that calling your org, course number, or display name, 'course' will mess this up
re.compile(r'^Course Outline \|'): [
@@ -62,9 +57,11 @@ TRUTHY_WAIT = {
re.compile(r'^Pages \|'): [
'XBlock'
],
re.compile(r'^Studio Home \|'): [
'toggle_sock'
# Unit page
re.compile(r'Unit \|'): [
"jQuery", "XBlock", "ContainerFactory"
],
}