Fixed double click issue

This commit is contained in:
benmcmahon100
2015-09-04 21:34:07 +01:00
parent 6f73628511
commit f7d7990c4f

View File

@ -421,7 +421,7 @@ function showCompletion() {
); );
var bonfireSolution = myCodeMirror.getValue(); var bonfireSolution = myCodeMirror.getValue();
var didCompleteWith = $('#completed-with').val() || null; var didCompleteWith = $('#completed-with').val() || null;
$('#complete-courseware-dialog').modal('show'); $('#complete-courseware-dialog').modal('show').focus();
$('#submit-challenge').click(function(e) { $('#submit-challenge').click(function(e) {
e.preventDefault(); e.preventDefault();
@ -639,6 +639,9 @@ var runTests = function(err, data) {
allTestsPassed = false; allTestsPassed = false;
showCompletion(); showCompletion();
} }
else{
isInitRun = false;
}
} }
}; };
@ -755,7 +758,6 @@ $(document).ready(function() {
allSeeds; allSeeds;
myCodeMirror.setValue(replaceSafeTags(editorValue)); myCodeMirror.setValue(replaceSafeTags(editorValue));
if (typeof $preview.html() !== 'undefined') { if (typeof $preview.html() !== 'undefined') {
$preview.load(function() { $preview.load(function() {
if (initPreview) { if (initPreview) {