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