Revert "Revert "attempt to fix challenge submit part two""
This reverts commit 706bd1beca
.
This commit is contained in:
@ -159,31 +159,7 @@ $(document).ready(function() {
|
|||||||
$('#complete-zipline-or-basejump-dialog').modal('show');
|
$('#complete-zipline-or-basejump-dialog').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
|
$('#next-courseware-button').unbind('click');
|
||||||
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').on('click', function() {
|
$('#next-courseware-button').on('click', function() {
|
||||||
$('#next-courseware-button').unbind('click');
|
$('#next-courseware-button').unbind('click');
|
||||||
if ($('.signup-btn-nav').length < 1) {
|
if ($('.signup-btn-nav').length < 1) {
|
||||||
@ -260,23 +236,52 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.next-challenge-button').unbind('click');
|
||||||
$('.next-challenge-button').on('click', function() {
|
$('.next-challenge-button').on('click', function() {
|
||||||
l = location.pathname.split('/');
|
l = location.pathname.split('/');
|
||||||
window.location = '/challenges/' + (parseInt(l[l.length - 1]) + 1);
|
window.location = '/challenges/' + (parseInt(l[l.length - 1]) + 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bonfire instructions functions
|
// Bonfire instructions functions
|
||||||
|
$('#more-info').unbind('click');
|
||||||
$('#more-info').on('click', function() {
|
$('#more-info').on('click', function() {
|
||||||
ga('send', 'event', 'Challenge', 'more-info', challengeName);
|
ga('send', 'event', 'Challenge', 'more-info', challengeName);
|
||||||
$('#brief-instructions').hide();
|
$('#brief-instructions').hide();
|
||||||
$('#long-instructions').show().removeClass('hide');
|
$('#long-instructions').show().removeClass('hide');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
$('#less-info').unbind('click');
|
||||||
$('#less-info').on('click', function() {
|
$('#less-info').on('click', function() {
|
||||||
$('#brief-instructions').show();
|
$('#brief-instructions').show();
|
||||||
$('#long-instructions').hide();
|
$('#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) {
|
function upvoteHandler(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var upvoteBtn = this;
|
var upvoteBtn = this;
|
||||||
|
Reference in New Issue
Block a user