Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
230f252b
Commit
230f252b
authored
Feb 27, 2016
by
Daniel Friedman
Committed by
Brian Jacobel
May 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the way jquery and jquery-migrate are loaded
Don't use symlinks to include node_modules
parent
665f983c
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
32 additions
and
58 deletions
+32
-58
cms/static/cms/js/require-config.js
+3
-10
cms/static/coffee/spec/main.coffee
+3
-9
cms/static/coffee/spec/main_squire.coffee
+2
-1
common/djangoapps/pipeline_mako/tests/test_render.py
+2
-2
common/static/common/js/common_libraries.js
+1
-0
common/static/common/js/spec/main_requirejs.js
+4
-1
common/static/js/vendor/jquery-migrate.min.js
+0
-2
common/static/js/vendor/jquery.min.js
+0
-2
lms/envs/common.py
+6
-6
lms/static/coffee/spec/instructor_dashboard/membership_spec.coffee
+0
-6
lms/static/js/spec/main.js
+3
-10
lms/static/lms/js/build.js
+1
-3
lms/static/lms/js/require-config.js
+4
-5
lms/templates/verify_student/test/fake_softwaresecure_response.html
+1
-1
pavelib/assets.py
+2
-0
No files found.
cms/static/cms/js/require-config.js
View file @
230f252b
...
@@ -27,12 +27,8 @@
...
@@ -27,12 +27,8 @@
"mustache"
:
"js/vendor/mustache"
,
"mustache"
:
"js/vendor/mustache"
,
"codemirror"
:
"js/vendor/codemirror-compressed"
,
"codemirror"
:
"js/vendor/codemirror-compressed"
,
"codemirror/stex"
:
"js/vendor/CodeMirror/stex"
,
"codemirror/stex"
:
"js/vendor/CodeMirror/stex"
,
// The jquery-migrate library was added in upgrading from
"jquery"
:
"common/js/vendor/jquery"
,
// jQuery 1.7.x to 2.2.x. This config allows developers
"jquery-migrate"
:
"common/js/vendor/jquery-migrate"
,
// to depend on "jquery" which opaquely requires both
// libraries.
"_jquery"
:
"js/vendor/jquery.min"
,
"jquery"
:
"js/vendor/jquery-migrate.min"
,
"jquery.ui"
:
"js/vendor/jquery-ui.min"
,
"jquery.ui"
:
"js/vendor/jquery-ui.min"
,
"jquery.form"
:
"js/vendor/jquery.form"
,
"jquery.form"
:
"js/vendor/jquery.form"
,
"jquery.markitup"
:
"js/vendor/markitup/jquery.markitup"
,
"jquery.markitup"
:
"js/vendor/markitup/jquery.markitup"
,
...
@@ -117,10 +113,7 @@
...
@@ -117,10 +113,7 @@
"date"
:
{
"date"
:
{
exports
:
"Date"
exports
:
"Date"
},
},
"jquery"
:
{
"jquery-migrate"
:
[
'jquery'
],
deps
:
[
"_jquery"
],
exports
:
"jQuery"
},
"jquery.ui"
:
{
"jquery.ui"
:
{
deps
:
[
"jquery"
],
deps
:
[
"jquery"
],
exports
:
"jQuery.ui"
exports
:
"jQuery.ui"
...
...
cms/static/coffee/spec/main.coffee
View file @
230f252b
...
@@ -4,11 +4,8 @@ requirejs.config({
...
@@ -4,11 +4,8 @@ requirejs.config({
"gettext"
:
"xmodule_js/common_static/js/test/i18n"
,
"gettext"
:
"xmodule_js/common_static/js/test/i18n"
,
"mustache"
:
"xmodule_js/common_static/js/vendor/mustache"
,
"mustache"
:
"xmodule_js/common_static/js/vendor/mustache"
,
"codemirror"
:
"xmodule_js/common_static/js/vendor/CodeMirror/codemirror"
,
"codemirror"
:
"xmodule_js/common_static/js/vendor/CodeMirror/codemirror"
,
# The jquery-migrate library was added in upgrading from
"jquery"
:
"xmodule_js/common_static/common/js/vendor/jquery"
,
# jQuery 1.7.x to 2.2.x. This config allows developers to
"jquery-migrate"
:
"xmodule_js/common_static/common/js/vendor/jquery-migrate"
,
# depend on "jquery" which opaquely requires both libraries.
"_jquery"
:
"xmodule_js/common_static/js/vendor/jquery.min"
,
"jquery"
:
"xmodule_js/common_static/js/vendor/jquery-migrate.min"
,
"jquery.ui"
:
"xmodule_js/common_static/js/vendor/jquery-ui.min"
,
"jquery.ui"
:
"xmodule_js/common_static/js/vendor/jquery-ui.min"
,
"jquery.form"
:
"xmodule_js/common_static/js/vendor/jquery.form"
,
"jquery.form"
:
"xmodule_js/common_static/js/vendor/jquery.form"
,
"jquery.markitup"
:
"xmodule_js/common_static/js/vendor/markitup/jquery.markitup"
,
"jquery.markitup"
:
"xmodule_js/common_static/js/vendor/markitup/jquery.markitup"
,
...
@@ -69,10 +66,7 @@ requirejs.config({
...
@@ -69,10 +66,7 @@ requirejs.config({
"date"
:
{
"date"
:
{
exports
:
"Date"
exports
:
"Date"
},
},
"jquery"
:
{
"jquery-migrate"
:
[
'jquery'
],
deps
:
[
"_jquery"
],
exports
:
"jQuery"
},
"jquery.ui"
:
{
"jquery.ui"
:
{
deps
:
[
"jquery"
],
deps
:
[
"jquery"
],
exports
:
"jQuery.ui"
exports
:
"jQuery.ui"
...
...
cms/static/coffee/spec/main_squire.coffee
View file @
230f252b
...
@@ -5,7 +5,8 @@ requirejs.config({
...
@@ -5,7 +5,8 @@ requirejs.config({
"gettext"
:
"xmodule_js/common_static/js/test/i18n"
,
"gettext"
:
"xmodule_js/common_static/js/test/i18n"
,
"mustache"
:
"xmodule_js/common_static/js/vendor/mustache"
,
"mustache"
:
"xmodule_js/common_static/js/vendor/mustache"
,
"codemirror"
:
"xmodule_js/common_static/js/vendor/CodeMirror/codemirror"
,
"codemirror"
:
"xmodule_js/common_static/js/vendor/CodeMirror/codemirror"
,
"jquery"
:
"xmodule_js/common_static/js/vendor/jquery.min"
,
"jquery"
:
"xmodule_js/common_static/common/js/vendor/jquery"
,
"jquery-migrate"
:
"xmodule_js/common_static/common/js/vendor/jquery-migrate"
,
"jquery.ui"
:
"xmodule_js/common_static/js/vendor/jquery-ui.min"
,
"jquery.ui"
:
"xmodule_js/common_static/js/vendor/jquery-ui.min"
,
"jquery.form"
:
"xmodule_js/common_static/js/vendor/jquery.form"
,
"jquery.form"
:
"xmodule_js/common_static/js/vendor/jquery.form"
,
"jquery.markitup"
:
"xmodule_js/common_static/js/vendor/markitup/jquery.markitup"
,
"jquery.markitup"
:
"xmodule_js/common_static/js/vendor/markitup/jquery.markitup"
,
...
...
common/djangoapps/pipeline_mako/tests/test_render.py
View file @
230f252b
...
@@ -14,7 +14,7 @@ class RequireJSPathOverridesTest(TestCase):
...
@@ -14,7 +14,7 @@ class RequireJSPathOverridesTest(TestCase):
"""Test RequireJS path overrides. """
"""Test RequireJS path overrides. """
OVERRIDES
=
{
OVERRIDES
=
{
'jquery'
:
'
js/vendor/jquery.min
.js'
,
'jquery'
:
'
common/js/vendor/jquery
.js'
,
'backbone'
:
'common/js/vendor/backbone.js'
,
'backbone'
:
'common/js/vendor/backbone.js'
,
'text'
:
'js/vendor/text.js'
'text'
:
'js/vendor/text.js'
}
}
...
@@ -24,7 +24,7 @@ class RequireJSPathOverridesTest(TestCase):
...
@@ -24,7 +24,7 @@ class RequireJSPathOverridesTest(TestCase):
"(function (require) {"
,
"(function (require) {"
,
"require.config({"
,
"require.config({"
,
"paths: {"
,
"paths: {"
,
"'jquery': '
js/vendor/jquery.min
',"
,
"'jquery': '
common/js/vendor/jquery
',"
,
"'text': 'js/vendor/text',"
,
"'text': 'js/vendor/text',"
,
"'backbone': 'common/js/vendor/backbone'"
,
"'backbone': 'common/js/vendor/backbone'"
,
"}"
,
"}"
,
...
...
common/static/common/js/common_libraries.js
View file @
230f252b
...
@@ -3,6 +3,7 @@ define([
...
@@ -3,6 +3,7 @@ define([
'edx-ui-toolkit/js/utils/html-utils'
,
'edx-ui-toolkit/js/utils/html-utils'
,
'domReady!'
,
'domReady!'
,
'jquery'
,
'jquery'
,
'jquery-migrate'
,
'backbone'
,
'backbone'
,
'underscore'
,
'underscore'
,
'gettext'
'gettext'
...
...
common/static/common/js/spec/main_requirejs.js
View file @
230f252b
(
function
(
requirejs
,
define
)
{
(
function
(
requirejs
,
define
)
{
'use strict'
;
requirejs
.
config
({
requirejs
.
config
({
baseUrl
:
'/base/'
,
baseUrl
:
'/base/'
,
paths
:
{
paths
:
{
'gettext'
:
'js/test/i18n'
,
'gettext'
:
'js/test/i18n'
,
'jquery'
:
'js/vendor/jquery.min'
,
'jquery'
:
'common/js/vendor/jquery'
,
'jquery-migrate'
:
'common/js/vendor/jquery-migrate'
,
'jquery.ui'
:
'js/vendor/jquery-ui.min'
,
'jquery.ui'
:
'js/vendor/jquery-ui.min'
,
'jquery.flot'
:
'js/vendor/flot/jquery.flot.min'
,
'jquery.flot'
:
'js/vendor/flot/jquery.flot.min'
,
'jquery.form'
:
'js/vendor/jquery.form'
,
'jquery.form'
:
'js/vendor/jquery.form'
,
...
...
common/static/js/vendor/jquery-migrate.min.js
deleted
120000 → 0
View file @
665f983c
..
/
..
/
..
/
..
/
node_modules
/
jquery
-
migrate
/
dist
/
jquery
-
migrate
.
min
.
js
\ No newline at end of file
common/static/js/vendor/jquery.min.js
deleted
120000 → 0
View file @
665f983c
..
/
..
/
..
/
..
/
node_modules
/
jquery
/
dist
/
jquery
.
min
.
js
\ No newline at end of file
lms/envs/common.py
View file @
230f252b
...
@@ -1240,8 +1240,8 @@ proctoring_js = (
...
@@ -1240,8 +1240,8 @@ proctoring_js = (
# In the future, we will likely refactor this to use
# In the future, we will likely refactor this to use
# RequireJS and an optimizer.
# RequireJS and an optimizer.
base_vendor_js
=
[
base_vendor_js
=
[
'
js/vendor/jquery.min
.js'
,
'
common/js/vendor/jquery
.js'
,
'
js/vendor/jquery-migrate.min
.js'
,
'
common/js/vendor/jquery-migrate
.js'
,
'js/vendor/jquery.cookie.js'
,
'js/vendor/jquery.cookie.js'
,
'js/vendor/url.min.js'
,
'js/vendor/url.min.js'
,
'common/js/vendor/underscore.js'
,
'common/js/vendor/underscore.js'
,
...
@@ -1353,16 +1353,16 @@ incourse_reverify_js = [
...
@@ -1353,16 +1353,16 @@ incourse_reverify_js = [
ccx_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'js/ccx/**/*.js'
))
ccx_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'js/ccx/**/*.js'
))
certificates_web_view_js
=
[
certificates_web_view_js
=
[
'
js/vendor/jquery.min
.js'
,
'
common/js/vendor/jquery
.js'
,
'
js/vendor/jquery-migrate.min
.js'
,
'
common/js/vendor/jquery-migrate
.js'
,
'js/vendor/jquery.cookie.js'
,
'js/vendor/jquery.cookie.js'
,
'js/src/logger.js'
,
'js/src/logger.js'
,
'js/utils/facebook.js'
,
'js/utils/facebook.js'
,
]
]
credit_web_view_js
=
[
credit_web_view_js
=
[
'
js/vendor/jquery.min
.js'
,
'
common/js/vendor/jquery
.js'
,
'
js/vendor/jquery-migrate.min
.js'
,
'
common/js/vendor/jquery-migrate
.js'
,
'js/vendor/jquery.cookie.js'
,
'js/vendor/jquery.cookie.js'
,
'js/src/logger.js'
,
'js/src/logger.js'
,
]
]
...
...
lms/static/coffee/spec/instructor_dashboard/membership_spec.coffee
View file @
230f252b
...
@@ -3,12 +3,6 @@ describe 'AutoEnrollment', ->
...
@@ -3,12 +3,6 @@ describe 'AutoEnrollment', ->
loadFixtures
'coffee/fixtures/autoenrollment.html'
loadFixtures
'coffee/fixtures/autoenrollment.html'
@
autoenrollment
=
new
AutoEnrollmentViaCsv
$
(
'.auto_enroll_csv'
)
@
autoenrollment
=
new
AutoEnrollmentViaCsv
$
(
'.auto_enroll_csv'
)
it
'binds to the enrollment_signup_button on click event'
,
->
expect
(
@
autoenrollment
.
$enrollment_signup_button
).
toHandle
'click'
it
'binds to the browse button on change event'
,
->
expect
(
@
autoenrollment
.
$browse_button
).
toHandle
'change'
it
'binds the ajax call and the result will be success'
,
->
it
'binds the ajax call and the result will be success'
,
->
spyOn
(
$
,
"ajax"
).
and
.
callFake
((
params
)
=>
spyOn
(
$
,
"ajax"
).
and
.
callFake
((
params
)
=>
params
.
success
({
row_errors
:
[],
general_errors
:
[],
warnings
:
[]})
params
.
success
({
row_errors
:
[],
general_errors
:
[],
warnings
:
[]})
...
...
lms/static/js/spec/main.js
View file @
230f252b
...
@@ -8,12 +8,8 @@
...
@@ -8,12 +8,8 @@
paths
:
{
paths
:
{
'gettext'
:
'xmodule_js/common_static/js/test/i18n'
,
'gettext'
:
'xmodule_js/common_static/js/test/i18n'
,
'codemirror'
:
'xmodule_js/common_static/js/vendor/CodeMirror/codemirror'
,
'codemirror'
:
'xmodule_js/common_static/js/vendor/CodeMirror/codemirror'
,
// The jquery-migrate library was added in upgrading from
'jquery'
:
'xmodule_js/common_static/common/js/vendor/jquery'
,
// jQuery 1.7.x to 2.2.x. This config allows developers
'jquery-migrate'
:
'xmodule_js/common_static/common/js/vendor/jquery-migrate'
,
// to depend on "jquery" which opaquely requires both
// libraries.
'_jquery'
:
'xmodule_js/common_static/js/vendor/jquery.min'
,
'jquery'
:
'xmodule_js/common_static/js/vendor/jquery-migrate.min'
,
'jquery.ui'
:
'xmodule_js/common_static/js/vendor/jquery-ui.min'
,
'jquery.ui'
:
'xmodule_js/common_static/js/vendor/jquery-ui.min'
,
'jquery.eventDrag'
:
'xmodule_js/common_static/js/vendor/jquery.event.drag-2.2'
,
'jquery.eventDrag'
:
'xmodule_js/common_static/js/vendor/jquery.event.drag-2.2'
,
'jquery.flot'
:
'xmodule_js/common_static/js/vendor/flot/jquery.flot.min'
,
'jquery.flot'
:
'xmodule_js/common_static/js/vendor/flot/jquery.flot.min'
,
...
@@ -124,10 +120,7 @@
...
@@ -124,10 +120,7 @@
'date'
:
{
'date'
:
{
exports
:
'Date'
exports
:
'Date'
},
},
"jquery"
:
{
"jquery-migrate"
:
[
'jquery'
],
deps
:
[
"_jquery"
],
exports
:
"jQuery"
},
'jquery.ui'
:
{
'jquery.ui'
:
{
deps
:
[
'jquery'
],
deps
:
[
'jquery'
],
exports
:
'jQuery.ui'
exports
:
'jQuery.ui'
...
...
lms/static/lms/js/build.js
View file @
230f252b
...
@@ -65,10 +65,8 @@
...
@@ -65,10 +65,8 @@
paths
:
{
paths
:
{
'gettext'
:
'empty:'
,
'gettext'
:
'empty:'
,
'coffee/src/ajax_prefix'
:
'empty:'
,
'coffee/src/ajax_prefix'
:
'empty:'
,
// '_jquery' is the name of the current jQuery in the
// platform, and 'jquery' refers to jquery-migrate.
'_jquery'
:
'empty:'
,
'jquery'
:
'empty:'
,
'jquery'
:
'empty:'
,
'jquery-migrate'
:
'empty:'
,
'jquery.cookie'
:
'empty:'
,
'jquery.cookie'
:
'empty:'
,
'jquery.url'
:
'empty:'
,
'jquery.url'
:
'empty:'
,
'backbone'
:
'empty:'
,
'backbone'
:
'empty:'
,
...
...
lms/static/lms/js/require-config.js
View file @
230f252b
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
}
}
};
};
defineDependency
(
"jQuery"
,
"jquery"
);
defineDependency
(
"jQuery"
,
"jquery"
);
defineDependency
(
"jQuery"
,
"jquery-migrate"
);
defineDependency
(
"_"
,
"underscore"
);
defineDependency
(
"_"
,
"underscore"
);
defineDependency
(
"s"
,
"underscore.string"
);
defineDependency
(
"s"
,
"underscore.string"
);
// Underscore.string no longer installs itself directly on "_". For compatibility with existing
// Underscore.string no longer installs itself directly on "_". For compatibility with existing
...
@@ -68,8 +69,8 @@
...
@@ -68,8 +69,8 @@
// jQuery 1.7.x to 2.2.x. This config allows developers
// jQuery 1.7.x to 2.2.x. This config allows developers
// to depend on "jquery" which opaquely requires both
// to depend on "jquery" which opaquely requires both
// libraries.
// libraries.
"
_jquery"
:
"js/vendor/jquery.min
"
,
"
jquery"
:
"common/js/vendor/jquery
"
,
"jquery
"
:
"js/vendor/jquery-migrate.min
"
,
"jquery
-migrate"
:
"common/js/vendor/jquery-migrate
"
,
"jquery.cookie"
:
"js/vendor/jquery.cookie"
,
"jquery.cookie"
:
"js/vendor/jquery.cookie"
,
'jquery.timeago'
:
'js/vendor/jquery.timeago'
,
'jquery.timeago'
:
'js/vendor/jquery.timeago'
,
"jquery.url"
:
"js/vendor/url.min"
,
"jquery.url"
:
"js/vendor/url.min"
,
...
@@ -116,13 +117,11 @@
...
@@ -116,13 +117,11 @@
"date"
:
{
"date"
:
{
exports
:
"Date"
exports
:
"Date"
},
},
<<<<<<<
HEAD
=======
"jquery"
:
{
"jquery"
:
{
deps
:
[
"_jquery"
],
deps
:
[
"_jquery"
],
exports
:
"jQuery"
exports
:
"jQuery"
},
},
>>>>>>>
Upgrade
jQuery
1.7
.
2
to
2.2
.
0
"jquery-migrate"
:
[
'jquery'
],
"jquery.cookie"
:
{
"jquery.cookie"
:
{
deps
:
[
"jquery"
],
deps
:
[
"jquery"
],
exports
:
"jQuery.fn.cookie"
exports
:
"jQuery.fn.cookie"
...
...
lms/templates/verify_student/test/fake_softwaresecure_response.html
View file @
230f252b
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</body>
</body>
</html>
</html>
<script
type=
"text/javascript"
src=
"${static.url('
js/vendor/jquery.min
.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('
common/js/vendor/jquery
.js')}"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
...
...
pavelib/assets.py
View file @
230f252b
...
@@ -45,6 +45,8 @@ SASS_LOAD_PATHS = [
...
@@ -45,6 +45,8 @@ SASS_LOAD_PATHS = [
# A list of NPM installed libraries that should be copied into the common
# A list of NPM installed libraries that should be copied into the common
# static directory.
# static directory.
NPM_INSTALLED_LIBRARIES
=
[
NPM_INSTALLED_LIBRARIES
=
[
'jquery/dist/jquery.js'
,
'jquery-migrate/dist/jquery-migrate.js'
,
'underscore/underscore.js'
,
'underscore/underscore.js'
,
'underscore.string/dist/underscore.string.js'
,
'underscore.string/dist/underscore.string.js'
,
'picturefill/dist/picturefill.js'
,
'picturefill/dist/picturefill.js'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment