diff --git a/public/js/main.js b/public/js/main.js index e108d8c9ac..9a903a1d08 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -74,14 +74,14 @@ $(document).ready(function() { completedBonfire(didCompleteWith, bonfireSolution, thisBonfireHash); }); + $('#completed-courseware').on('click', function() { - console.log('trying to show modal'); $('#complete-courseware-dialog').modal('show'); }); $('#complete-courseware-dialog').on('keypress', function(e) { - if (e.which === 13 || e === 13) { - $('#next-courseware-button').click(); + if (e.ctrlKey && e.keyCode == 13) { + $('#next-courseware-button').click(); } }); diff --git a/views/coursewares/showVideo.jade b/views/coursewares/showVideo.jade index 278a19609f..214b3c2d13 100644 --- a/views/coursewares/showVideo.jade +++ b/views/coursewares/showVideo.jade @@ -47,4 +47,9 @@ block content h1 #{name} script. var challengeName = !{JSON.stringify(name)}; - var passedCoursewareHash = !{JSON.stringify(coursewareHash)}; \ No newline at end of file + var passedCoursewareHash = !{JSON.stringify(coursewareHash)}; + $('body').on('keypress', function(e) { + if (e.ctrlKey && e.keyCode == 13) { + $('#complete-courseware-dialog').modal('show'); + } + }); \ No newline at end of file