js: only add close link on notification messages on gadjo pages (#16533)

This commit is contained in:
Frédéric Péters 2017-05-28 20:12:38 +02:00
parent 6633683dca
commit 4e10f6e0a7
1 changed files with 9 additions and 7 deletions

View File

@ -315,14 +315,16 @@ var gadjo_js = gadjo_js || {};
/* 440 is header image height (500px) - header height (60px) */
var timestamp = ((new Date().getTime() / 1000) % 86400 ) / (86400 / 440);
$('div#header').css('background-position', '0 -' + timestamp + 'px');
}
$('.messages > li').each(function(idx, elem) {
var elem = $('<a aria-hidden="true" class="close">×</a>');
$(elem).on('click', function() {
$(this).parent('li').fadeOut('slow');
/* add × to close notification messages */
$('.messages > li').each(function(idx, elem) {
var elem = $('<a aria-hidden="true" class="close">×</a>');
$(elem).on('click', function() {
$(this).parent('li').fadeOut('slow');
});
$(this).prepend(elem);
});
$(this).prepend(elem);
});
}
});
$(function() {
$('a.extra-actions-menu-opener').on('click', function() {