mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Do not show all logs when clicking on 'log' button.
This commit is contained in:
parent
c51f8dc0b3
commit
06c8fae22d
2 changed files with 4 additions and 5 deletions
2
src/dist/js/script.min.js
vendored
2
src/dist/js/script.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -81,16 +81,15 @@ var app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (level == 'log') {
|
if (level == 'log') {
|
||||||
$('#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();
|
$('#flash').append('<pre style="display:none" class="alert alert-dismissable '+ alertClass +'"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><button type="button" class="btn btn-default btn-small" data-show="log">'+ y18n.t('log') +'</button><p style="display: none">'+ message +'</p></pre>').show();
|
||||||
} else {
|
} else {
|
||||||
$('#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').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();
|
$('#flash .alert').last().fadeIn();
|
||||||
}
|
}
|
||||||
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
||||||
$('#flash .alert-log button.btn-small').on('click', function() {
|
$('#flash [data-show="log"]').on('click', function() {
|
||||||
$('#flash .alert-log p:hidden').fadeIn();
|
$(this).hide().nextAll('p').fadeIn();
|
||||||
$('#flash .alert-log div').hide();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue