hide flash after 5 sec [fixes SCI-660]

This commit is contained in:
zmagod 2016-11-11 12:30:48 +01:00
parent 0793fb9f11
commit 59f7bdb54e

View file

@ -191,12 +191,32 @@ function notificationAlertClose(){
.removeClass("alert-shown");
});
}
(function(){
$(document).ready(function(){
function tree_link_truncation() {
$('.tree-link a').each( function(){
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
});
$(".tree-link span").each( function(){
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
});
}
function hide_flash_msg() {
var flash = $('.alert');
if (flash.length > 0) {
window.setTimeout(function () {
flash.fadeTo(500, 0).slideUp(500, function () {
$(this).remove();
$('#content-wrapper')
.css('marginTop', '50px');
});
}, 5000);
}
}
$( document ).ready(function() {
tree_link_truncation();
hide_flash_msg();
});
})();