add zipline and basejump to portfolio view, and bonfires with solutions(not yet writing name to bonfireCompletion record on user

This commit is contained in:
Michael Q Larson
2015-04-05 00:01:51 -07:00
parent c9b4a90f57
commit 9d746f7d49
7 changed files with 134 additions and 3191 deletions

View File

@@ -30,31 +30,16 @@ $(document).ready(function() {
.addClass('animated fadeInDown');
});
//$('.completed-challenge').on('click', function() {
// $('#complete-challenge-dialog').modal('show');
// // Only post to server if there is an authenticated user
// if ($('.signup-btn-nav').length < 1) {
// l = location.pathname.split('/');
// cn = l[l.length - 1];
// $.ajax({
// type: 'POST',
// data: {challengeNumber: cn},
// url: '/completed-challenge/'
// });
// }
//});
function completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash) {
$('#complete-bonfire-dialog').modal('show');
// Only post to server if there is an authenticated user
if ($('.signup-btn-nav').length < 1) {
$.post(
'/completed-bonfire',
{
bonfireInfo: {
completedWith : didCompleteWith,
bonfireName: title,
completedWith: didCompleteWith,
solution: bonfireSolution,
bonfireHash: thisBonfireHash
}
@@ -70,8 +55,9 @@ $(document).ready(function() {
$('.next-bonfire-button').on('click', function() {
var bonfireSolution = myCodeMirror.getValue();
var thisBonfireHash = passedBonfireHash || null;
var bonfireName = title;
var didCompleteWith = $('#completed-with').val() || null;
completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash);
completedBonfire(didCompleteWith, bonfireName, bonfireSolution, thisBonfireHash);
});