mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Allow different flash level simultaneously
This commit is contained in:
parent
f93d116035
commit
5fffdda9a6
2 changed files with 5 additions and 7 deletions
|
@ -19,7 +19,7 @@
|
|||
<div class="clearfix"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="flash" class="alert" style="display: none">
|
||||
<div id="flash" style="display: none">
|
||||
</div>
|
||||
<div id="slider-container">
|
||||
<div id="slideBack" class="block" style="display: none;"></div>
|
||||
|
|
10
js/app.js
10
js/app.js
|
@ -47,14 +47,12 @@ app = Sammy('#main', function (sam) {
|
|||
html = '';
|
||||
for(lvl in flashs) {
|
||||
flashs[lvl].forEach( function(msg) {
|
||||
html += '<div class="'+ lvl +'">'+ msg +'</div>';
|
||||
if (lvl == 'fail') { alertClass = 'alert-danger'; }
|
||||
else { alertClass = 'alert-'+ lvl; }
|
||||
html += '<div class="alert '+ alertClass +'">'+ msg +'</div>';
|
||||
});
|
||||
}
|
||||
if (level == 'fail') { alertClass = 'alert-danger'; }
|
||||
else if (level == 'success') { alertClass = 'alert-success'; }
|
||||
else { alertClass = 'alert-info'; }
|
||||
|
||||
$('#flash').removeClass().addClass('alert '+ alertClass).html(html).fadeIn();
|
||||
$('#flash').html(html).fadeIn();
|
||||
},
|
||||
|
||||
// API connection helper
|
||||
|
|
Loading…
Reference in a new issue