Revert "Merge pull request #17325 from cpennington/switch-asset-index-factory-to-webpack"
This reverts commit1c46bd89c3, reversing changes made toeb6064e333.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* done.
|
||||
*/
|
||||
modules: getModulesList([
|
||||
'js/factories/asset_index',
|
||||
'js/factories/base',
|
||||
'js/factories/container',
|
||||
'js/factories/course_create_rerun',
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
define(['js/base', 'cms/js/main', 'js/src/logger', 'datepair', 'accessibility',
|
||||
'ieshim', 'tooltip_manager', 'lang_edx', 'js/models/course'],
|
||||
function() {
|
||||
'use strict';
|
||||
}
|
||||
);
|
||||
'ieshim', 'tooltip_manager', 'lang_edx', 'js/models/course']);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
define(
|
||||
['js/factories/asset_index', 'common/js/utils/page_factory', 'js/factories/base'],
|
||||
function(AssetIndexFactory, invokePageFactory) {
|
||||
'use strict';
|
||||
invokePageFactory('AssetIndexFactory', AssetIndexFactory);
|
||||
}
|
||||
);
|
||||
@@ -1,11 +0,0 @@
|
||||
(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/base'],
|
||||
['js/factories/login', 'common/js/utils/page_factory'],
|
||||
function(LoginFactory, invokePageFactory) {
|
||||
'use strict';
|
||||
invokePageFactory('LoginFactory', LoginFactory);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
define(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
require(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
function(domReady, $) {
|
||||
'use strict';
|
||||
|
||||
var toggleSock = function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -35,5 +33,4 @@ define(['domReady', 'jquery', 'jquery.smoothScroll'],
|
||||
// toggling footer additional support
|
||||
$('.cta-show-sock').bind('click', toggleSock);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
% endif
|
||||
</%block>
|
||||
|
||||
<%block name="page_bundle">
|
||||
<%block name="requirejs">
|
||||
% if not waffle_flag_enabled:
|
||||
<%static:invoke_page_bundle page_name="js/pages/asset_index" class_name="AssetIndexFactory">
|
||||
{
|
||||
assetCallbackUrl: "${asset_callback_url|n, js_escaped_string}",
|
||||
uploadChunkSizeInMBs: ${ chunk_size_in_mbs| n, dump_js_escaped_json },
|
||||
maxFileSizeInMBs: ${ max_file_size_in_mbs| n, dump_js_escaped_json },
|
||||
maxFileSizeRedirectUrl: "${max_file_size_redirect_url|n, js_escaped_string}"
|
||||
}
|
||||
</%static:invoke_page_bundle>
|
||||
require(["js/factories/asset_index"], function (AssetIndexFactory) {
|
||||
AssetIndexFactory({
|
||||
assetCallbackUrl: "${asset_callback_url|n, js_escaped_string}",
|
||||
uploadChunkSizeInMBs: ${chunk_size_in_mbs|n, dump_js_escaped_json},
|
||||
maxFileSizeInMBs: ${max_file_size_in_mbs|n, dump_js_escaped_json},
|
||||
maxFileSizeRedirectUrl: "${max_file_size_redirect_url|n, js_escaped_string}"
|
||||
});
|
||||
});
|
||||
% endif
|
||||
</%block>
|
||||
|
||||
|
||||
@@ -121,39 +121,29 @@ from openedx.core.djangolib.markup import HTML
|
||||
<%block name="modal_placeholder"></%block>
|
||||
|
||||
<%block name="jsextra"></%block>
|
||||
|
||||
% if context_course:
|
||||
<script type="text/javascript">
|
||||
if (typeof window.pageFactoryArguments == "undefined") {
|
||||
window.pageFactoryArguments = {};
|
||||
}
|
||||
|
||||
window.pageFactoryArguments['ContextCourse'] = {
|
||||
id: "${context_course.id | n, js_escaped_string}",
|
||||
name: "${context_course.display_name_with_default | n, js_escaped_string}",
|
||||
url_name: "${context_course.location.block_id | n, js_escaped_string}",
|
||||
org: "${context_course.location.org | n, js_escaped_string}",
|
||||
num: "${context_course.location.course | n, js_escaped_string}",
|
||||
display_course_number: "${context_course.display_coursenumber | n, js_escaped_string}",
|
||||
revision: "${context_course.location.branch | n, js_escaped_string}",
|
||||
self_paced: ${ context_course.self_paced | n, dump_js_escaped_json }
|
||||
}
|
||||
</script>
|
||||
% endif
|
||||
% if user.is_authenticated():
|
||||
<%static:invoke_page_bundle page_name='js/sock'/>
|
||||
% endif
|
||||
<%block name='page_bundle'>
|
||||
<script type="text/javascript">
|
||||
require(['js/factories/base'], function () {
|
||||
require(['js/models/course'], function(Course) {
|
||||
% if context_course:
|
||||
window.course = new Course(window.pageFactoryArguments['ContextCourse']);
|
||||
% endif
|
||||
<%block name='requirejs'></%block>
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<%block name="page_bundle">
|
||||
<script type="text/javascript">
|
||||
require(['js/factories/base'], function () {
|
||||
require(['js/models/course'], function(Course) {
|
||||
% if context_course:
|
||||
window.course = new Course({
|
||||
id: "${context_course.id | n, js_escaped_string}",
|
||||
name: "${context_course.display_name_with_default | n, js_escaped_string}",
|
||||
url_name: "${context_course.location.block_id | n, js_escaped_string}",
|
||||
org: "${context_course.location.org | n, js_escaped_string}",
|
||||
num: "${context_course.location.course | n, js_escaped_string}",
|
||||
display_course_number: "${context_course.display_coursenumber | n, js_escaped_string}",
|
||||
revision: "${context_course.location.branch | n, js_escaped_string}",
|
||||
self_paced: ${context_course.self_paced | n, dump_js_escaped_json}
|
||||
});
|
||||
% endif
|
||||
% if user.is_authenticated():
|
||||
require(['js/sock']);
|
||||
% endif
|
||||
<%block name='requirejs'></%block>
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
<%include file="widgets/segment-io-footer.html" />
|
||||
<div class="modal-cover"></div>
|
||||
|
||||
Reference in New Issue
Block a user