Improved flash message handling

This commit is contained in:
Graham Triggs 2017-09-22 23:41:54 +01:00
parent 554ba83eb0
commit a647ea0156
3 changed files with 6 additions and 3 deletions

View file

@ -10,7 +10,9 @@ $(document).ready(function(){
jQuery('section#welcome-message').css('display', 'block').delay(2000).fadeOut(1500, function() { jQuery('section#welcome-msg-container').remove(); });
// fade in flash-message when user logs out
jQuery('section#flash-message').css('display', 'none').fadeIn(1500);
jQuery('section#flash-message').css('display', 'none').fadeIn(1500, function() {
$(this).delay(2000).fadeOut(1500, function() { jQuery('section#flash-msg-container').remove(); });
});
/////////////////////////////
// Home search filter

View file

@ -709,6 +709,7 @@ p.password-note {
padding: .25em;
margin-bottom: 8px;
}
#flash-msg-container,
#welcome-msg-container {
margin-bottom: 8px;
margin-top: -10px;

View file

@ -6,8 +6,8 @@
<section id="welcome-message" role="alert">${flash}</section>
</section>
<#else>
<section id="flash-message" role="alert">
${flash}
<section id="flash-msg-container" role="container">
<section id="flash-message" role="alert">${flash}</section>
</section>
</#if>
</#if>