get hotkey working in showVideo
This commit is contained in:
@ -74,14 +74,14 @@ $(document).ready(function() {
|
|||||||
completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash);
|
completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#completed-courseware').on('click', function() {
|
$('#completed-courseware').on('click', function() {
|
||||||
console.log('trying to show modal');
|
|
||||||
$('#complete-courseware-dialog').modal('show');
|
$('#complete-courseware-dialog').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#complete-courseware-dialog').on('keypress', function(e) {
|
$('#complete-courseware-dialog').on('keypress', function(e) {
|
||||||
if (e.which === 13 || e === 13) {
|
if (e.ctrlKey && e.keyCode == 13) {
|
||||||
$('#next-courseware-button').click();
|
$('#next-courseware-button').click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -47,4 +47,9 @@ block content
|
|||||||
h1 #{name}
|
h1 #{name}
|
||||||
script.
|
script.
|
||||||
var challengeName = !{JSON.stringify(name)};
|
var challengeName = !{JSON.stringify(name)};
|
||||||
var passedCoursewareHash = !{JSON.stringify(coursewareHash)};
|
var passedCoursewareHash = !{JSON.stringify(coursewareHash)};
|
||||||
|
$('body').on('keypress', function(e) {
|
||||||
|
if (e.ctrlKey && e.keyCode == 13) {
|
||||||
|
$('#complete-courseware-dialog').modal('show');
|
||||||
|
}
|
||||||
|
});
|
Reference in New Issue
Block a user