Add link to WebSocket test if WebSocket connection failed
This commit is contained in:
@ -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 () {
|
||||
|
Reference in New Issue
Block a user