fix the button hotkeys in the showZiplineOrBasejump view

This commit is contained in:
Quincy Larson
2015-04-29 22:32:52 -07:00
parent 0c1ba64a83
commit 026f210b6e
2 changed files with 4 additions and 2 deletions

View File

@ -67,6 +67,7 @@ block content
$('#complete-courseware-dialog').bind('keypress', modalControlEnterHandler);
- if (user.progressTimestamps.length > 2)
.button-spacer
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

View File

@ -35,13 +35,13 @@ block content
var controlEnterHandler = function (e) {
$('body').unbind('keypress');
if (e.ctrlKey && e.keyCode == 13) {
$('#complete-courseware-dialog').modal('show');
$('#complete-zipline-or-basejump-dialog').modal('show');
} else {
$('body').bind('keypress', controlEnterHandler);
}
};
var modalControlEnterHandler = function (e) {
$('#complete-courseware-dialog').unbind('keypress');
$('#complete-zipline-or-basejump-dialog').unbind('keypress');
if (e.ctrlKey && e.keyCode == 13) {
$('#next-courseware-button').click();
} else {
@ -83,6 +83,7 @@ block content
$('#complete-zipline-or-basejump-dialog').on('keypress', modalControlEnterHandler);
- if (user.progressTimestamps.length > 2)
.button-spacer
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank")
i.fa.fa-twitter  
= phrase