Commit 791b8b14 by Harry Rein

Importing bootstrap and popper through webpack.

parent 19406fa4
...@@ -33,11 +33,6 @@ from student.models import CourseEnrollment ...@@ -33,11 +33,6 @@ from student.models import CourseEnrollment
<%static:include path="dashboard/${template_name}.underscore" /> <%static:include path="dashboard/${template_name}.underscore" />
</script> </script>
% endfor % endfor
% if course_entitlements:
<!-- This is a temporary solution before we land a fix to load these through Webpack, tracked by LEARNER-3483 -->
<script type="text/javascript" src="${static.url('common/js/vendor/popper.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/bootstrap.js')}"></script>
% endif
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
...@@ -52,6 +47,7 @@ from student.models import CourseEnrollment ...@@ -52,6 +47,7 @@ from student.models import CourseEnrollment
}); });
}); });
</script> </script>
<%static:webpack entry="Bootstrap"></%static:webpack>
<%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory"> <%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory">
UnenrollmentFactory({ UnenrollmentFactory({
urls: { urls: {
......
...@@ -9,10 +9,7 @@ from openedx.core.djangolib.js_utils import ( ...@@ -9,10 +9,7 @@ from openedx.core.djangolib.js_utils import (
%> %>
<%block name="js_extra"> <%block name="js_extra">
<!-- This is a temporary solution before we land a fix to load these through Webpack, tracked by LEARNER-3483 --> <%static:webpack entry="Bootstrap"></%static:webpack>
<script type="text/javascript" src="${static.url('common/js/vendor/popper.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/bootstrap.js')}"></script>
<%static:require_module module_name="js/learner_dashboard/program_details_factory" class_name="ProgramDetailsFactory"> <%static:require_module module_name="js/learner_dashboard/program_details_factory" class_name="ProgramDetailsFactory">
ProgramDetailsFactory({ ProgramDetailsFactory({
programData: ${program_data | n, dump_js_escaped_json}, programData: ${program_data | n, dump_js_escaped_json},
......
...@@ -34,11 +34,6 @@ from student.models import CourseEnrollment ...@@ -34,11 +34,6 @@ from student.models import CourseEnrollment
<%static:include path="dashboard/${template_name}.underscore" /> <%static:include path="dashboard/${template_name}.underscore" />
</script> </script>
% endfor % endfor
% if course_entitlements:
<!-- This is a temporary solution before we land a fix to load these through Webpack, tracked by LEARNER-3483 -->
<script type="text/javascript" src="${static.url('common/js/vendor/popper.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/bootstrap.js')}"></script>
% endif
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
...@@ -53,6 +48,7 @@ from student.models import CourseEnrollment ...@@ -53,6 +48,7 @@ from student.models import CourseEnrollment
}); });
}); });
</script> </script>
<%static:webpack entry="Bootstrap"></%static:webpack>
<%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory"> <%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory">
UnenrollmentFactory({ UnenrollmentFactory({
urls: { urls: {
......
...@@ -26,7 +26,6 @@ module.exports = { ...@@ -26,7 +26,6 @@ module.exports = {
SingleSupportForm: './lms/static/support/jsx/single_support_form.jsx', SingleSupportForm: './lms/static/support/jsx/single_support_form.jsx',
AlertStatusBar: './lms/static/js/accessible_components/StatusBarAlert.jsx', AlertStatusBar: './lms/static/js/accessible_components/StatusBarAlert.jsx',
Bootstrap: './lms/static/common/js/vendor/bootstrap.js', Bootstrap: './lms/static/common/js/vendor/bootstrap.js',
EntitlementView: './lms/static/js/learner_dashboard/views/course_entitlement_view.js',
// Features // Features
CourseGoals: './openedx/features/course_experience/static/course_experience/js/CourseGoals.js', CourseGoals: './openedx/features/course_experience/static/course_experience/js/CourseGoals.js',
...@@ -63,7 +62,8 @@ module.exports = { ...@@ -63,7 +62,8 @@ module.exports = {
_: 'underscore', _: 'underscore',
$: 'jquery', $: 'jquery',
jQuery: 'jquery', jQuery: 'jquery',
'window.jQuery': 'jquery' 'window.jQuery': 'jquery',
Popper: ['popper.js', 'default']
}), }),
// Note: Until karma-webpack releases v3, it doesn't play well with // Note: Until karma-webpack releases v3, it doesn't play well with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment