diff --git a/cms/static/cms/js/require-config.js b/cms/static/cms/js/require-config.js index 3167c3136f..8139da6206 100644 --- a/cms/static/cms/js/require-config.js +++ b/cms/static/cms/js/require-config.js @@ -17,7 +17,6 @@ require.config({ paths: { "domReady": "js/vendor/domReady", "gettext": "/i18n", - "json2": "js/vendor/json2", "mustache": "js/vendor/mustache", "codemirror": "js/vendor/codemirror-compressed", "codemirror/stex": "js/vendor/CodeMirror/stex", @@ -96,9 +95,6 @@ require.config({ ] }, shim: { - "json2": { - exports: "JSON" - }, "gettext": { exports: "gettext" }, diff --git a/cms/static/coffee/spec/main.coffee b/cms/static/coffee/spec/main.coffee index f567289d27..a2a5cb3083 100644 --- a/cms/static/coffee/spec/main.coffee +++ b/cms/static/coffee/spec/main.coffee @@ -23,7 +23,6 @@ requirejs.config({ "jquery.simulate": "xmodule_js/common_static/js/vendor/jquery.simulate", "datepair": "xmodule_js/common_static/js/vendor/timepicker/datepair", "date": "xmodule_js/common_static/js/vendor/date", - "json2": "xmodule_js/common_static/js/vendor/json2", "moment": "xmodule_js/common_static/js/vendor/moment.min", "moment-with-locales": "xmodule_js/common_static/js/vendor/moment-with-locales.min", "text": "xmodule_js/common_static/js/vendor/requirejs/text", @@ -59,9 +58,6 @@ requirejs.config({ "js/spec/test_utils": "js/spec/test_utils", } shim: { - "json2": { - exports: "JSON" - }, "gettext": { exports: "gettext" }, diff --git a/cms/static/js/utils/drag_and_drop.js b/cms/static/js/utils/drag_and_drop.js index 436ca7d4ff..6228a32019 100644 --- a/cms/static/js/utils/drag_and_drop.js +++ b/cms/static/js/utils/drag_and_drop.js @@ -1,6 +1,6 @@ -define(["jquery", "jquery.ui", "underscore", "json2", "gettext", "draggabilly", +define(["jquery", "jquery.ui", "underscore", "gettext", "draggabilly", "js/utils/module", "common/js/components/views/feedback_notification"], - function ($, ui, _, JSON, gettext, Draggabilly, ModuleUtils, NotificationView) { + function ($, ui, _, gettext, Draggabilly, ModuleUtils, NotificationView) { 'use strict'; var contentDragger = { diff --git a/cms/static/js_test.yml b/cms/static/js_test.yml index b28c63aaf2..37e229f4eb 100644 --- a/cms/static/js_test.yml +++ b/cms/static/js_test.yml @@ -59,7 +59,6 @@ lib_paths: - xmodule_js/common_static/js/vendor/draggabilly.pkgd.js - xmodule_js/common_static/js/vendor/date.js - xmodule_js/common_static/js/vendor/domReady.js - - xmodule_js/common_static/js/vendor/json2.js - xmodule_js/common_static/js/vendor/URI.min.js - xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min.js - xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js diff --git a/common/static/js/vendor/draggabilly.pkgd.js b/common/static/js/vendor/draggabilly.pkgd.js index 9289408151..a266c7790d 100644 --- a/common/static/js/vendor/draggabilly.pkgd.js +++ b/common/static/js/vendor/draggabilly.pkgd.js @@ -1748,7 +1748,14 @@ return Unidragger; if ( typeof define == 'function' && define.amd ) { // AMD - define( [ + // Note: fixed by andy-armstrong to include a name for the definition + // so that this works when optimized using r.js. This is only an issue + // in Studio, as the LMS uses a namespaced version of RequireJS so + // this clause isn't reached. + // See http://requirejs.org/docs/errors.html#mismatch + define( + 'draggabilly', + [ 'classie/classie', 'get-style-property/get-style-property', 'get-size/get-size',