From ed2853564e3db719abf5378b31fe5067dad513c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 12 Feb 2014 21:51:11 +0100 Subject: [PATCH] [fix] somes fixes on old default theme --- themes/default/_footer.twig | 2 +- themes/default/_head.twig | 21 +++++++++++---------- themes/default/js/closeMessage.js | 17 +++++++++++++++++ 3 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 themes/default/js/closeMessage.js diff --git a/themes/default/_footer.twig b/themes/default/_footer.twig index f837ae38..3057cb75 100644 --- a/themes/default/_footer.twig +++ b/themes/default/_footer.twig @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/themes/default/_head.twig b/themes/default/_head.twig index 577cc693..f310e420 100644 --- a/themes/default/_head.twig +++ b/themes/default/_head.twig @@ -1,11 +1,12 @@ - - - - - - + + + + + + - - - - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/themes/default/js/closeMessage.js b/themes/default/js/closeMessage.js new file mode 100644 index 00000000..b57fe4a8 --- /dev/null +++ b/themes/default/js/closeMessage.js @@ -0,0 +1,17 @@ +$(function(){ + //--------------------------------------------------------------------------- + // Show the close icon when the user hover over a message + //--------------------------------------------------------------------------- + $('.messages').on('mouseenter', function(){ + $(this).find('a.closeMessage').stop(true, true).show(); + }).on('mouseleave', function(){ + $(this).find('a.closeMessage').stop(true, true).hide(); + }); + //--------------------------------------------------------------------------- + // Close the message box when the user clicks the close icon + //--------------------------------------------------------------------------- + $('a.closeMessage').on('click', function(){ + $(this).parents('div.messages').slideUp(300, function(){ $(this).remove(); }); + return false; + }); +}); \ No newline at end of file -- 2.41.0