mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Add a close button to flash notifications
This commit is contained in:
parent
3fc7599a99
commit
03cf21830f
1 changed files with 3 additions and 3 deletions
|
@ -80,14 +80,14 @@ app = Sammy('#main', function (sam) {
|
|||
}
|
||||
} else {
|
||||
if (level == 'log') {
|
||||
$('#flash').append('<pre style="display:none" class="alert '+ alertClass +'"><div><button type="button" class="btn btn-default btn-small">'+ y18n.t('log') +'</button></div><p style="display: none">'+ message +'</p></pre>').show();
|
||||
$('#flash').append('<pre style="display:none" class="alert alert-dismissable '+ alertClass +'"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div><button type="button" class="btn btn-default btn-small">'+ y18n.t('log') +'</button></div><p style="display: none">'+ message +'</p></pre>').show();
|
||||
} else {
|
||||
$('#flash').append('<div style="display:none" class="alert '+ alertClass +'"><p>'+ message +'</p></div>').show();
|
||||
$('#flash').append('<div style="display:none" class="alert alert-dismissable '+ alertClass +'"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><p>'+ message +'</p></div>').show();
|
||||
}
|
||||
$('#flash .alert').last().fadeIn();
|
||||
}
|
||||
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
||||
$('#flash .alert-log button').on('click', function() {
|
||||
$('#flash .alert-log button.btn-small').on('click', function() {
|
||||
$('#flash .alert-log p:hidden').fadeIn();
|
||||
$('#flash .alert-log div').hide();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue