Commit caa5bdb4 by Braden MacDonald

Fix: unable to re-order child blocks within Step Builder

parent ff271b2d
......@@ -1124,10 +1124,6 @@ class MentoringWithExplicitStepsBlock(BaseMentoringBlock, StudioContainerWithNes
"""
Add some HTML to the author view that allows authors to add child blocks.
"""
context['wrap_children'] = {
'head': u'<div class="mentoring">',
'tail': u'</div>'
}
fragment = super(MentoringWithExplicitStepsBlock, self).author_edit_view(context)
fragment.add_content(loader.render_template('templates/html/mentoring_url_name.html', {
"url_name": self.url_name
......
......@@ -350,10 +350,6 @@ class PlotBlock(StudioEditableXBlockMixin, StudioContainerWithNestedXBlocksMixin
"""
Add some HTML to the author view that allows authors to add child blocks.
"""
context['wrap_children'] = {
'head': u'<div class="mentoring">',
'tail': u'</div>'
}
fragment = super(PlotBlock, self).author_edit_view(context)
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/problem-builder-edit.css'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/util.js'))
......
......@@ -9,4 +9,9 @@ function ProblemBuilderContainerEdit(runtime, element) {
if (window.ProblemBuilderUtil) {
ProblemBuilderUtil.transformClarifications(element);
}
// Add a "mentoring" class to the root XBlock so we can use it as a
// selector. We cannot just add a div.mentoring wrapper around our children
// since it breaks jQuery drag-and-drop re-ordering of children.
$(".wrapper-xblock.level-page > .xblock-render > .xblock").addClass("mentoring");
}
......@@ -212,10 +212,6 @@ class MentoringStepBlock(
Add some HTML to the author view that allows authors to add child blocks.
"""
local_context = dict(context)
local_context['wrap_children'] = {
'head': u'<div class="mentoring">',
'tail': u'</div>'
}
local_context['author_edit_view'] = True
fragment = super(MentoringStepBlock, self).author_edit_view(local_context)
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/problem-builder.css'))
......
......@@ -285,10 +285,6 @@ class ReviewStepBlock(
"""
Add some HTML to the author view that allows authors to add child blocks.
"""
context['wrap_children'] = {
'head': u'<div class="mentoring">',
'tail': u'</div>'
}
fragment = super(ReviewStepBlock, self).author_edit_view(context)
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/problem-builder.css'))
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/problem-builder-edit.css'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment