Revert "Revert "Merge pull request #17325 from cpennington/switch-asset-index-factory-to-webpack""
This reverts commit 67177ac72d.
The original PR cause a breakage on production due to webpack building two different
copies of the asset_index.js bundle. However, it is unclear whether that was a
transitory issue or not. This commit restores the original PR to validate whether
the problem is reproducible.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
* done.
|
||||
*/
|
||||
modules: getModulesList([
|
||||
'js/factories/asset_index',
|
||||
'js/factories/base',
|
||||
'js/factories/container',
|
||||
'js/factories/course_create_rerun',
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
define(['js/base', 'cms/js/main', 'js/src/logger', 'datepair', 'accessibility',
|
||||
'ieshim', 'tooltip_manager', 'lang_edx', 'js/models/course']);
|
||||
'ieshim', 'tooltip_manager', 'lang_edx', 'js/models/course'],
|
||||
function() {
|
||||
'use strict';
|
||||
}
|
||||
);
|
||||
|
||||
7
cms/static/js/pages/asset_index.js
Normal file
7
cms/static/js/pages/asset_index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define(
|
||||
['js/factories/asset_index', 'common/js/utils/page_factory', 'js/factories/base'],
|
||||
function(AssetIndexFactory, invokePageFactory) {
|
||||
'use strict';
|
||||
invokePageFactory('AssetIndexFactory', AssetIndexFactory);
|
||||
}
|
||||
);
|
||||
11
cms/static/js/pages/course.js
Normal file
11
cms/static/js/pages/course.js
Normal file
@@ -0,0 +1,11 @@
|
||||
(function(define) {
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
['js/models/course'],
|
||||
function(ContextCourse) {
|
||||
window.course = new ContextCourse(window.pageFactoryArguments.ContextCourse[0]);
|
||||
}
|
||||
);
|
||||
}).call(this, define || RequireJS.define);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
define(
|
||||
['js/factories/login', 'common/js/utils/page_factory'],
|
||||
['js/factories/login', 'common/js/utils/page_factory', 'js/factories/base'],
|
||||
function(LoginFactory, invokePageFactory) {
|
||||
'use strict';
|
||||
invokePageFactory('LoginFactory', LoginFactory);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
require(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
define(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
function(domReady, $) {
|
||||
'use strict';
|
||||
|
||||
var toggleSock = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -33,4 +35,5 @@ require(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
// toggling footer additional support
|
||||
$('.cta-show-sock').bind('click', toggleSock);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user