Revert "Revert "attempt to fix challenge submit part two""

This reverts commit 706bd1beca.
This commit is contained in:
Quincy Larson
2015-08-19 18:11:43 -07:00
parent 706bd1beca
commit a6a765e9a4

View File

@ -159,31 +159,7 @@ $(document).ready(function() {
$('#complete-zipline-or-basejump-dialog').modal('show');
});
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
editor.focus();
});
$('#complete-zipline-or-basejump').on('hidden.bs.modal', function() {
editor.focus();
});
};
$(window).resize(function(){
reBindModals();
});
reBindModals();
var challengeTypes = {
'HTML_CSS_JQ': '0',
'JAVASCRIPT': '1',
'VIDEO': '2',
'ZIPLINE': '3',
'BASEJUMP': '4',
'BONFIRE': '5'
};
$('#next-courseware-button').unbind('click');
$('#next-courseware-button').on('click', function() {
$('#next-courseware-button').unbind('click');
if ($('.signup-btn-nav').length < 1) {
@ -260,23 +236,52 @@ $(document).ready(function() {
}
});
$('.next-challenge-button').unbind('click');
$('.next-challenge-button').on('click', function() {
l = location.pathname.split('/');
window.location = '/challenges/' + (parseInt(l[l.length - 1]) + 1);
});
// Bonfire instructions functions
$('#more-info').unbind('click');
$('#more-info').on('click', function() {
ga('send', 'event', 'Challenge', 'more-info', challengeName);
$('#brief-instructions').hide();
$('#long-instructions').show().removeClass('hide');
});
$('#less-info').unbind('click');
$('#less-info').on('click', function() {
$('#brief-instructions').show();
$('#long-instructions').hide();
});
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
editor.focus();
});
$('#complete-zipline-or-basejump').on('hidden.bs.modal', function() {
editor.focus();
});
};
$(window).resize(function(){
reBindModals();
});
reBindModals();
var challengeTypes = {
'HTML_CSS_JQ': '0',
'JAVASCRIPT': '1',
'VIDEO': '2',
'ZIPLINE': '3',
'BASEJUMP': '4',
'BONFIRE': '5'
};
function upvoteHandler(e) {
e.preventDefault();
var upvoteBtn = this;