From f166ee2592b276c1024bd50935d014bb91bd9966 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 23 Feb 2018 14:42:10 -0500 Subject: [PATCH] Convert the Studio Library view to webpack --- cms/static/js/pages/library.js | 8 ++++++++ cms/templates/library.html | 2 +- webpack.common.config.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 cms/static/js/pages/library.js diff --git a/cms/static/js/pages/library.js b/cms/static/js/pages/library.js new file mode 100644 index 0000000000..846ba7b111 --- /dev/null +++ b/cms/static/js/pages/library.js @@ -0,0 +1,8 @@ +define( + ['js/factories/library', 'common/js/utils/page_factory', 'js/factories/base'], + function(LibraryFactory, invokePageFactory) { + 'use strict'; + invokePageFactory('LibraryFactory', LibraryFactory); + } +); + diff --git a/cms/templates/library.html b/cms/templates/library.html index b293697bfd..e3a3b17aa8 100644 --- a/cms/templates/library.html +++ b/cms/templates/library.html @@ -37,7 +37,7 @@ from openedx.core.djangolib.markup import HTML, Text showChildrenPreviews: ${context_library.show_children_previews | n, dump_js_escaped_json} } ); - }); + <%block name="content"> diff --git a/webpack.common.config.js b/webpack.common.config.js index 439a2bc266..d974bfdb49 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -33,6 +33,7 @@ module.exports = { 'js/pages/login': './cms/static/js/pages/login.js', 'js/pages/textbooks': './cms/static/js/pages/textbooks.js', 'js/pages/container': './cms/static/js/pages/container.js', + 'js/pages/library': './cms/static/js/pages/library.js', 'js/sock': './cms/static/js/sock.js', // LMS