From ee5e0ad4553374503e6ea4b06e83063bfb582d85 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 21 Dec 2016 17:26:33 +0100 Subject: [PATCH] Fix flash message display in samples table [SCI-816] --- app/assets/javascripts/samples/sample_datatable.js.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb index 857ef7367..0117f89d9 100644 --- a/app/assets/javascripts/samples/sample_datatable.js.erb +++ b/app/assets/javascripts/samples/sample_datatable.js.erb @@ -487,6 +487,13 @@ function onClickSave() { data: data, success: function (data) { sampleAlertMsg(data.flash, "success"); + var flash = $('.alert'); + window.setTimeout(function () { + flash.fadeTo(500, 0).slideUp(500, function () { + $(this).remove(); + $('#content-wrapper').removeClass('alert-shown'); + }); + }, 5000); onClickCancel(); }, error: function (e, eData, status, xhr) {