pull/192/head
Michael Q Larson 2015-03-11 23:01:39 -07:00
commit 58e4e3c21a
3 changed files with 12 additions and 5 deletions

1
app.js
View File

@ -183,6 +183,7 @@ app.use(helmet.contentSecurityPolicy({
].concat(trusted),
frameSrc: [
'*.gitter.im',
'*.gitter.im https:',
'*.vimeo.com',
'*.twitter.com',
'*.rafflecopter.com',

View File

@ -70,6 +70,12 @@ $(document).ready(function() {
$('#complete-courseware-dialog').modal('show');
});
$('#complete-courseware-dialog').on('keypress', function(e) {
if (e.which === 13 || e === 13) {
$('#next-courseware-button').click();
}
});
$('#complete-bonfire-dialog').on('hidden.bs.modal', function() {
editor.focus();
});

View File

@ -45,7 +45,7 @@ block content
script(type="text/javascript").
var tests = !{JSON.stringify(tests)};
var challengeSeed = !{JSON.stringify(challengeSeed)};
var passedBonfireHash = !{JSON.stringify(coursewareHash)};
var passedCoursewareHash = !{JSON.stringify(coursewareHash)};
var challengeName = !{JSON.stringify(name)};
var started = Math.floor(Date.now() / 1000);
.col-xs-12.col-sm-12.col-md-8
@ -65,10 +65,10 @@ block content
span.completion-icon.ion-checkmark-circled.text-primary
- if (cc)
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Go to my next challenge (ctrl + enter)
a#next-courseware-button.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-courseware-button(name='_csrf', value=_csrf) Go to my next challenge (ctrl + enter)
- if (points && points > 2)
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Bonfire:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/bonfires/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank")
i.fa.fa-twitter  
= phrase
i.fa.fa-twitter  
= phrase
- else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress