fix the button hotkeys in the showZiplineOrBasejump view
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user