Merge pull request #11963 from edx/andya/upgrade-underscore-string
Upgrade Underscore.string
This commit is contained in:
@@ -1248,7 +1248,7 @@ base_vendor_js = [
|
||||
'js/vendor/jquery.cookie.js',
|
||||
'js/vendor/url.min.js',
|
||||
'common/js/vendor/underscore.js',
|
||||
'js/vendor/underscore.string.min.js',
|
||||
'common/js/vendor/underscore.string.js',
|
||||
|
||||
# Make some edX UI Toolkit utilities available in the global "edx" namespace
|
||||
'edx-ui-toolkit/js/utils/global-loader.js',
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
'moment-with-locales': 'xmodule_js/common_static/js/vendor/moment-with-locales.min',
|
||||
'text': 'xmodule_js/common_static/js/vendor/requirejs/text',
|
||||
'underscore': 'xmodule_js/common_static/common/js/vendor/underscore',
|
||||
'underscore.string': 'xmodule_js/common_static/js/vendor/underscore.string.min',
|
||||
'underscore.string': 'xmodule_js/common_static/common/js/vendor/underscore.string',
|
||||
'backbone': 'xmodule_js/common_static/js/vendor/backbone-min',
|
||||
'backbone.associations': 'xmodule_js/common_static/js/vendor/backbone-associations-min',
|
||||
'backbone.paginator': 'xmodule_js/common_static/js/vendor/backbone.paginator.min',
|
||||
|
||||
@@ -57,7 +57,7 @@ lib_paths:
|
||||
- xmodule_js/src/xmodule.js
|
||||
- xmodule_js/common_static/js/src/
|
||||
- xmodule_js/common_static/common/js/vendor/underscore.js
|
||||
- xmodule_js/common_static/js/vendor/underscore.string.min.js
|
||||
- xmodule_js/common_static/common/js/vendor/underscore.string.js
|
||||
- xmodule_js/common_static/js/vendor/backbone-min.js
|
||||
- xmodule_js/common_static/js/vendor/backbone.paginator.min.js
|
||||
- xmodule_js/common_static/js/vendor/edxnotes/annotator-full.min.js
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
};
|
||||
defineDependency("jQuery", "jquery");
|
||||
defineDependency("_", "underscore");
|
||||
if (window._ && window._.str) {
|
||||
define("underscore.string", [], function () {return window._.str;});
|
||||
}
|
||||
else {
|
||||
console.error("Expected _.str (underscore.string) to be on the window object, but not found.");
|
||||
defineDependency("s", "underscore.string");
|
||||
// Underscore.string no longer installs itself directly on "_". For compatibility with existing
|
||||
// code, add it to "_" with its previous name.
|
||||
if (window._ && window.s) {
|
||||
window._.str = window.s;
|
||||
}
|
||||
defineDependency("gettext", "gettext");
|
||||
defineDependency("Logger", "logger");
|
||||
@@ -62,7 +62,7 @@
|
||||
"backbone-super": "js/vendor/backbone-super",
|
||||
"backbone.paginator": "js/vendor/backbone.paginator.min",
|
||||
"underscore": "common/js/vendor/underscore",
|
||||
"underscore.string": "js/vendor/underscore.string.min",
|
||||
"underscore.string": "common/js/vendor/underscore.string",
|
||||
"jquery": "js/vendor/jquery.min",
|
||||
"jquery.cookie": "js/vendor/jquery.cookie",
|
||||
'jquery.timeago': 'js/vendor/jquery.timeago',
|
||||
|
||||
Reference in New Issue
Block a user