mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-30 20:23:14 +08:00
hide flash after 5 sec [fixes SCI-660]
This commit is contained in:
parent
0793fb9f11
commit
59f7bdb54e
1 changed files with 27 additions and 7 deletions
|
@ -191,12 +191,32 @@ function notificationAlertClose(){
|
||||||
.removeClass("alert-shown");
|
.removeClass("alert-shown");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
(function(){
|
||||||
|
|
||||||
$(document).ready(function(){
|
function tree_link_truncation() {
|
||||||
$('.tree-link a').each( function(){
|
$('.tree-link a').each( function(){
|
||||||
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
|
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
|
||||||
});
|
});
|
||||||
$(".tree-link span").each( function(){
|
$(".tree-link span").each( function(){
|
||||||
truncateLongString( $(this), <%= Constants::NAME_TRUNCATION_LENGTH %>);
|
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();
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|
Loading…
Reference in a new issue