diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-08-04 17:56:45 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-08-04 17:56:45 -0700 |
commit | 86a6d6cdbb46faae969dff1e27b6b52c23012174 (patch) | |
tree | d6286016a331c6e9cd9bd0465b5392c20f4d7138 /web | |
parent | 52539d7aaba96b7997a3c5a07e4a1ad234af7d04 (diff) |
Adding VideosResource to return JSON blobs of video data for the training page.
Diffstat (limited to 'web')
-rw-r--r-- | web/scripts/growth.js | 11 | ||||
-rw-r--r-- | web/style.css | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/web/scripts/growth.js b/web/scripts/growth.js index b9a36b0..5bc30d4 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -126,7 +126,7 @@ function playVideo(videoId) { $.ajax({ type: "GET", - url: "videos/" + videoId + ".json", + url: location.href + "/videos/" + videoId + ".json", dataType: "json" }).done(function(data) { if (data == null) { @@ -175,6 +175,15 @@ function reportVideoComplete(data) $('#chapterprogress .progresslabel').html(percent); closeVideo(); + + $.ajax({ + type: "POST", + url: location.href + "/videos/" + videoId + ".json", + dataType: "json", + data: {'completed':'true'} + }).error(function(jqXHR, error) { + notice('Could not record video completiton due to ' + error + '. If the problem persists, please contact us.'); + }); if (completed == total) { chapterComplete(); diff --git a/web/style.css b/web/style.css index ac13249..026ca7c 100644 --- a/web/style.css +++ b/web/style.css @@ -177,7 +177,6 @@ footer a:hover { } .progressbar, .progress { - margin-top: 0.5em; margin-bottom: 0.5em; height: 10px; background: #eaeaea; |