Add link to WebSocket test if WebSocket connection failed

This commit is contained in:
Sebastian Serth
2020-03-07 11:37:36 +01:00
parent 42d5480167
commit 82e560cace
6 changed files with 14 additions and 5 deletions

View File

@ -7,7 +7,7 @@ $( document ).on('turbolinks:load', function() {
var container = options.container;
var html = (options.icon ? '<i class="' + options.icon.join(' ') + '"></i>' : '') + options.text;
container.html(html);
showFlashes();
showFlashes(options.showPermanent);
}
};
@ -22,7 +22,7 @@ $( document ).on('turbolinks:load', function() {
});
};
var showFlashes = function() {
var showFlashes = function(showPermanent) {
$('.flash').each(function() {
var container = $(this);
var message = container.find('p');
@ -36,7 +36,8 @@ $( document ).on('turbolinks:load', function() {
if (message.html() !== '') {
container.slideDown();
container.animation = setTimeout(hide, DURATION);
if (showPermanent !== true)
container.animation = setTimeout(hide, DURATION);
}
button.on('click', function () {