Skip to content

Commit

Permalink
allow esc key to dismiss the model dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Jul 14, 2019
1 parent 08833b9 commit bd5c3c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/main/resources/templates/htmlReport.vsl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$('#modal-text').bind('copy cut', function() {
setTimeout('$("#modal-content,#modal-background").toggleClass("active");',100);
});
$('#modal-text').keyup(function(e){
if(e.keyCode === 27) {
setTimeout('$("#modal-content,#modal-background").toggleClass("active");',100);
}
});
$('#modal-add-header').click(function () {
xml = '<?xml version="1.0" encoding="UTF-8"?>\n<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">\n ';
xml += $("#modal-text").text().replace(/\n/g,'\n ');
Expand Down

0 comments on commit bd5c3c1

Please sign in to comment.