From 3945335f3988c7eb9d5bbf9e9428b2cd6c173a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 8 Apr 2014 21:58:44 +0200 Subject: can't close search popup with the cross picture #613 --- themes/default/js/popupForm.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 themes/default/js/popupForm.js (limited to 'themes/default/js') diff --git a/themes/default/js/popupForm.js b/themes/default/js/popupForm.js new file mode 100644 index 00000000..06be3f0c --- /dev/null +++ b/themes/default/js/popupForm.js @@ -0,0 +1,20 @@ +$(document).ready(function() { + + $("#search-form").hide(); + + function closeSearch() { + $("#search-form").toggle(); + $("#search").toggleClass("current"); + $("#search-arrow").toggleClass("arrow-down"); + } + + $("#search").click(function(){ + closeSearch(); + }); + + $("#search-form-close").click(function(){ + closeSearch(); + }); + + +}); \ No newline at end of file -- cgit v1.2.3 From f8e9d8bdbcd1514bef078456a6235288800f9950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 8 Apr 2014 22:10:40 +0200 Subject: [fix] Escap key displays save a link form #612 --- themes/default/js/saveLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/default/js') diff --git a/themes/default/js/saveLink.js b/themes/default/js/saveLink.js index ccc00d1e..bee453c0 100755 --- a/themes/default/js/saveLink.js +++ b/themes/default/js/saveLink.js @@ -75,7 +75,7 @@ $.fn.ready(function() { ========================================================================== */ $(window).keydown(function(e){ - if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || e.keyCode == 27 ) { + if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || (e.keyCode == 27 && $bagitForm.is(':visible') ) ) { $bagit.removeClass("current"); $("#bagit-arrow").removeClass("arrow-down"); toggleSaveLinkForm(); -- cgit v1.2.3