Improve multiple messages handling in samples [SCI-853]

This commit is contained in:
Oleksii Kriuchykhin 2017-01-09 13:55:50 +01:00
parent 0fd7688427
commit 773b00933a
2 changed files with 4 additions and 1 deletions

View file

@ -212,7 +212,9 @@ var HelperModule = (function(){
window.setTimeout(function () { window.setTimeout(function () {
flash.fadeTo(500, 0).slideUp(500, function () { flash.fadeTo(500, 0).slideUp(500, function () {
$(this).remove(); $(this).remove();
if($('.alert').length <= 0) {
$('#content-wrapper').removeClass('alert-shown'); $('#content-wrapper').removeClass('alert-shown');
}
}); });
}, 5000); }, 5000);
} }

View file

@ -58,6 +58,7 @@ function updateSamplesTypesandGroups() {
function sampleAlertMsg(message, type) { function sampleAlertMsg(message, type) {
var alertType; var alertType;
var glyphSign; var glyphSign;
$('#notifications').html('');
if (type === 'success') { if (type === 'success') {
alertType = ' alert-success '; alertType = ' alert-success ';
glyphSign = ' glyphicon-ok-sign '; glyphSign = ' glyphicon-ok-sign ';