Browse Source

Close all modals with Esc key

nin-v2
Mylène Bressan 9 years ago
parent
commit
3b884712a6
  1. 7
      js/theme_option.js

7
js/theme_option.js

@ -140,7 +140,10 @@ function reOrganizeTemplates() { // for nin's templating
// Close new post prompt with esc key // Close new post prompt with esc key
$(document).keyup(function(e) { $(document).keyup(function(e) {
if (e.keyCode == 27) {$('.mini-profile .post-area').removeClass('display');} if (e.keyCode == 27) {
$('.mini-profile .post-area').removeClass('display');
closeModal();
}
}); });
function reAppendModules() { // avoid w1200 things function reAppendModules() { // avoid w1200 things
@ -197,4 +200,4 @@ function openModal(modal) {
} }
} }
return modal; return modal;
} }

Loading…
Cancel
Save