Close project modals when pressing esc

This commit is contained in:
Hanzei 2018-06-27 11:23:07 +02:00
parent db4f7e5d7a
commit ae90b40388
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0

View file

@ -68,6 +68,11 @@
$('#close-{{ $index }}').click(function () {
$('#modal-{{ $index }}').removeClass('is-active');
});
$(document).keypress(function(e) {
if(e.which == 0) {
$('#modal-{{ $index }}').removeClass('is-active');
}
});
</script>
{{ end }} {{ end }}
{{ partial "top-icon.html" . }}