summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-09-09 23:03:49 -0700
committerJesse Morgan <jesse@jesterpm.net>2013-09-09 23:03:49 -0700
commit04a9e2ba0f9db0fdc5810caa78f89c427255fad9 (patch)
tree2a76fdcdafdd3d65186a9413dbaeb5caefb7e6c1 /web
parent68cbbea819fb7680120a9649eb75750f8e05eb57 (diff)
Adding the chapter transition page to the training section.
Diffstat (limited to 'web')
-rw-r--r--web/scripts/growth.js5
1 files changed, 4 insertions, 1 deletions
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";
}