Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cms/djangoapps/contentstore/views/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def _studio_wrap_xblock(xblock, view, frag, context, display_name_only=False):
}

add_webpack_js_to_fragment(frag, "js/factories/xblock_validation")
add_webpack_js_to_fragment(frag, "js/factories/tag_count")

html = render_to_string('studio_xblock_wrapper.html', template_context)
frag = wrap_fragment(frag, html)
Expand Down
13 changes: 5 additions & 8 deletions cms/templates/studio_xblock_wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,14 @@
${bool(block_is_unit) | n, dump_js_escaped_json}, // block_is_unit will be None or a boolean
$('div.xblock-validation-messages[data-locator="${xblock.location | n, js_escaped_string}"]')
);
</script>

<%static:webpack entry="js/factories/tag_count">
TagCountFactory({
tags_count: "${tags_count | n, js_escaped_string}",
content_id: "${xblock.location | n, js_escaped_string}",
course_authoring_url: "${course_authoring_url | n, js_escaped_string}",
},
tags_count: "${tags_count | n, js_escaped_string}",
content_id: "${xblock.location | n, js_escaped_string}",
course_authoring_url: "${course_authoring_url | n, js_escaped_string}",
},
$('li.tag-count[data-locator="${xblock.location | n, js_escaped_string}"]')
);
</%static:webpack>
</script>

% if not is_root:
% if is_reorderable:
Expand Down