Commit 6ae2e891 by Tim Krones

Fix: Enable "Add" buttons after removing child that can only be added

once (for Step Builder and Review Step).
parent feaf5da2
...@@ -26,8 +26,13 @@ function MentoringWithStepsEdit(runtime, element) { ...@@ -26,8 +26,13 @@ function MentoringWithStepsEdit(runtime, element) {
$buttons.on('click', disableButton); $buttons.on('click', disableButton);
}; };
var updateButtons = function() {
initButtons('sb-review-step'); initButtons('sb-review-step');
};
ProblemBuilderUtil.transformClarifications(element); ProblemBuilderUtil.transformClarifications(element);
StudioEditableXBlockMixin(runtime, element);
updateButtons();
runtime.listenTo('deleted-child', updateButtons);
} }
...@@ -27,8 +27,13 @@ function ReviewStepEdit(runtime, element) { ...@@ -27,8 +27,13 @@ function ReviewStepEdit(runtime, element) {
$buttons.on('click', disableButton); $buttons.on('click', disableButton);
}; };
var updateButtons = function() {
initButtons('pb-message'); initButtons('pb-message');
};
ProblemBuilderUtil.transformClarifications(element); ProblemBuilderUtil.transformClarifications(element);
StudioEditableXBlockMixin(runtime, element);
updateButtons();
runtime.listenTo('deleted-child', updateButtons);
} }
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