From 04a9e2ba0f9db0fdc5810caa78f89c427255fad9 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Mon, 9 Sep 2013 23:03:49 -0700 Subject: Adding the chapter transition page to the training section. --- web/scripts/growth.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/scripts/growth.js') diff --git a/web/scripts/growth.js b/web/scripts/growth.js index 0e66bbc..a79465c 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -165,6 +165,8 @@ function displayPlayer() function reportVideoComplete(data) { notice("You finished \u201C" + data.title + ".\u201D"); + var completedBefore = $('#videos article .completed').length; + $('#' + data.id).addClass('completed'); var completed = $('#videos article .completed').length; @@ -185,7 +187,7 @@ function reportVideoComplete(data) notice('Could not record video completiton due to ' + error + '. If the problem persists, please contact us.'); }); - if (completed == total) { + if (completed == total && completedBefore != completed) { chapterComplete(); } } @@ -202,4 +204,5 @@ function closeVideo() function chapterComplete() { notice("You've completed this chapter!"); + location.href += "/completed"; } -- cgit v1.2.3