diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2013-09-09 23:03:49 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2013-09-09 23:03:49 -0700 | 
| commit | a159577236f4e0d5c5c519470d730122e000650c (patch) | |
| tree | 05dcfd5ddd579283a739c14c2a4bfd335f24e239 /web | |
| parent | 36a347eb5eb247da324d1f76116828ab95d255ae (diff) | |
Adding the chapter transition page to the training section.
Diffstat (limited to 'web')
| -rw-r--r-- | web/scripts/growth.js | 5 | 
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";  }  | 
