From 54734841a25933e0fb265ad7a81a1b354437812b Mon Sep 17 00:00:00 2001 From: Harry Rein Date: Wed, 13 Dec 2017 12:11:45 -0500 Subject: [PATCH] Remove dependency on Popper.js --- .../js/learner_dashboard/views/course_entitlement_view.js | 3 ++- lms/static/lms/js/build.js | 1 + lms/static/lms/js/require-config.js | 4 ++++ lms/static/lms/js/spec/main.js | 4 ++++ lms/templates/dashboard.html | 1 - lms/templates/learner_dashboard/program_details_fragment.html | 1 - lms/templates/main.html | 3 +-- pavelib/assets.py | 3 +-- themes/edx.org/lms/templates/dashboard.html | 1 - webpack.common.config.js | 4 +--- 10 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lms/static/js/learner_dashboard/views/course_entitlement_view.js b/lms/static/js/learner_dashboard/views/course_entitlement_view.js index 80a28a815f..1522ef2366 100644 --- a/lms/static/js/learner_dashboard/views/course_entitlement_view.js +++ b/lms/static/js/learner_dashboard/views/course_entitlement_view.js @@ -10,7 +10,8 @@ 'js/learner_dashboard/models/course_entitlement_model', 'js/learner_dashboard/models/course_card_model', 'text!../../../templates/learner_dashboard/course_entitlement.underscore', - 'text!../../../templates/learner_dashboard/verification_popover.underscore' + 'text!../../../templates/learner_dashboard/verification_popover.underscore', + 'bootstrap' ], function( Backbone, diff --git a/lms/static/lms/js/build.js b/lms/static/lms/js/build.js index 2462a809ec..21eb317bd2 100644 --- a/lms/static/lms/js/build.js +++ b/lms/static/lms/js/build.js @@ -32,6 +32,7 @@ 'js/groups/views/cohorts_dashboard_factory', 'js/discussions_management/views/discussions_dashboard_factory', 'js/header_factory', + 'js/learner_dashboard/course_entitlement_factory', 'js/learner_dashboard/unenrollment_factory', 'js/learner_dashboard/program_details_factory', 'js/learner_dashboard/program_list_factory', diff --git a/lms/static/lms/js/require-config.js b/lms/static/lms/js/require-config.js index ba785e1d51..7a0a831e17 100644 --- a/lms/static/lms/js/require-config.js +++ b/lms/static/lms/js/require-config.js @@ -100,6 +100,7 @@ 'string_utils': 'js/src/string_utils', 'utility': 'js/src/utility', 'draggabilly': 'js/vendor/draggabilly', + 'bootstrap': 'common/js/vendor/bootstrap.bundle', // Files needed by OVA 'annotator': 'js/vendor/ova/annotator-full', @@ -165,6 +166,9 @@ 'backbone-super': { deps: ['backbone'] }, + 'bootstrap': { + deps: ['jquery'] + }, 'string_utils': { deps: ['underscore'], exports: 'interpolate_text' diff --git a/lms/static/lms/js/spec/main.js b/lms/static/lms/js/spec/main.js index 0ac5f80d62..148ff09ddb 100644 --- a/lms/static/lms/js/spec/main.js +++ b/lms/static/lms/js/spec/main.js @@ -74,6 +74,7 @@ 'mathjax_delay_renderer': 'coffee/src/mathjax_delay_renderer', 'MathJaxProcessor': 'coffee/src/customwmd', 'picturefill': 'common/js/vendor/picturefill', + 'bootstrap': 'common/js/vendor/bootstrap.bundle', 'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly', // Manually specify LMS files that are not converted to RequireJS @@ -186,6 +187,9 @@ deps: ['underscore', 'jquery'], exports: 'Backbone' }, + 'bootstrap': { + deps: ['jquery'] + }, 'backbone.associations': { deps: ['backbone'], exports: 'Backbone.Associations' diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 05520a36de..d3fcfd671c 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -47,7 +47,6 @@ from student.models import CourseEnrollment }); }); - <%static:webpack entry="Bootstrap"> <%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory"> UnenrollmentFactory({ urls: { diff --git a/lms/templates/learner_dashboard/program_details_fragment.html b/lms/templates/learner_dashboard/program_details_fragment.html index 580d62ec54..e3218e551e 100644 --- a/lms/templates/learner_dashboard/program_details_fragment.html +++ b/lms/templates/learner_dashboard/program_details_fragment.html @@ -9,7 +9,6 @@ from openedx.core.djangolib.js_utils import ( %> <%block name="js_extra"> -<%static:webpack entry="Bootstrap"> <%static:require_module module_name="js/learner_dashboard/program_details_factory" class_name="ProgramDetailsFactory"> ProgramDetailsFactory({ programData: ${program_data | n, dump_js_escaped_json}, diff --git a/lms/templates/main.html b/lms/templates/main.html index ded653734a..653966c1f9 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -88,8 +88,7 @@ from pipeline_mako import render_require_js_path_overrides % if uses_bootstrap: ## xss-lint: disable=mako-invalid-js-filter - - + % endif - <%static:webpack entry="Bootstrap"> <%static:require_module module_name="js/learner_dashboard/unenrollment_factory" class_name="UnenrollmentFactory"> UnenrollmentFactory({ urls: { diff --git a/webpack.common.config.js b/webpack.common.config.js index 7b7e80905f..42f92106f2 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -25,7 +25,6 @@ module.exports = { // LMS SingleSupportForm: './lms/static/support/jsx/single_support_form.jsx', AlertStatusBar: './lms/static/js/accessible_components/StatusBarAlert.jsx', - Bootstrap: './lms/static/common/js/vendor/bootstrap.js', // Features CourseGoals: './openedx/features/course_experience/static/course_experience/js/CourseGoals.js', @@ -62,8 +61,7 @@ module.exports = { _: 'underscore', $: 'jquery', jQuery: 'jquery', - 'window.jQuery': 'jquery', - Popper: ['popper.js', 'default'] + 'window.jQuery': 'jquery' }), // Note: Until karma-webpack releases v3, it doesn't play well with