Commit d3c81f43 by Jonathan Piacenti

Added notifications for locking navigation on supported platforms.

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