Commit d3c81f43 by Jonathan Piacenti

Added notifications for locking navigation on supported platforms.

parent 6db6db1a
......@@ -24,6 +24,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
}
function renderGrade() {
notify('navigation', {state: 'unlock'})
var data = $('.grade', element).data();
cleanAll();
$('.grade', element).html(gradeTemplate(data));
......@@ -48,6 +49,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
return;
active_child = -1;
notify('navigation', {state: 'lock'})
displayNextChild();
tryAgainDOM.hide();
submitDOM.show();
......@@ -66,6 +68,7 @@ function MentoringAssessmentView(runtime, element, mentoring) {
}
function initXBlockView() {
notify('navigation', {state: 'lock'})
submitDOM = $(element).find('.submit .input-main');
nextDOM = $(element).find('.submit .input-next');
reviewDOM = $(element).find('.submit .input-review');
......@@ -103,6 +106,13 @@ function MentoringAssessmentView(runtime, element, mentoring) {
return (active_child == mentoring.steps.length);
}
function notify(name, data){
// Notification interface does not exist in the workbench.
if (runtime.notify) {
runtime.notify(name, data)
}
}
function displayNextChild() {
cleanAll();
......
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