Rename require_page to invoke_page_bundle

This commit is contained in:
Calen Pennington
2018-01-26 10:27:33 -05:00
parent 5772042199
commit b701ad77c8
6 changed files with 11 additions and 11 deletions

View File

@@ -55,7 +55,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string
</%block>
<%block name="page_bundle">
<%static:require_page page_name="js/pages/login" class_name="LoginFactory">
<%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory">
"${reverse('homepage') | n, js_escaped_string}"
</%static:require_page>
</%static:invoke_page_bundle>
</%block>

View File

@@ -154,7 +154,7 @@ source, template_path = Loader(engine).load_template_source(path)
</script>
</%def>
<%def name="require_page(page_name, class_name)">
<%def name="invoke_page_bundle(page_name, class_name)">
<%doc>
Loads Javascript onto your page synchronously.
Uses RequireJS in development and a plain script tag in production.

View File

@@ -8,7 +8,7 @@ define([], function() {
throw Error(
'window.pageFactoryArguments must be initialized before calling invokePageFactory(' +
name +
'). Use the <%static:require_page> template tag.'
'). Use the <%static:invoke_page_bundle> template tag.'
);
}
args = window.pageFactoryArguments[name];
@@ -19,7 +19,7 @@ define([], function() {
name +
'"] must be initialized before calling invokePageFactory(' +
name +
'). Use the <%static:require_page> template tag.'
'). Use the <%static:invoke_page_bundle> template tag.'
);
}
factory.apply(null, window.pageFactoryArguments[name]);

View File

@@ -53,7 +53,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string
</%block>
<%block name="page_bundle">
<%static:require_page page_name="js/pages/login" class_name="LoginFactory">
<%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory">
"${reverse('homepage') | n, js_escaped_string}"
</%static:require_page>
</%static:invoke_page_bundle>
</%block>

View File

@@ -2383,8 +2383,8 @@ class MakoTemplateLinter(BaseLinter):
</script> | # script tag end
<%static:require_module(_async)?.*?> | # require js script tag start (optionally the _async version)
</%static:require_module(_async)?> | # require js script tag end (optionally the _async version)
<%static:require_page.*?> | # require js script tag start
</%static:require_page> | # require js script tag end
<%static:invoke_page_bundle.*?> | # require js script tag start
</%static:invoke_page_bundle> | # require js script tag end
<%static:webpack.*?> | # webpack script tag start
</%static:webpack> | # webpack script tag end
<%static:studiofrontend.*?> | # studiofrontend script tag start

View File

@@ -52,7 +52,7 @@ from django.utils.translation import ugettext as _
</%block>
<%block name="page_bundle">
<%static:require_page page_name="js/pages/login" class_name="LoginFactory">
<%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory">
"${reverse('homepage') | n, js_escaped_string}"
</%static:require_page>
</%static:invoke_page_bundle>
</%block>