diff --git a/assets/src/js/alert.js b/assets/src/js/alert.js deleted file mode 100644 index 7b96623d3..000000000 --- a/assets/src/js/alert.js +++ /dev/null @@ -1,30 +0,0 @@ -$(document).ready(function () { - // Messaggio di avviso salvataggio a comparsa sulla destra solo nella versione a desktop intero - if ($(window).width() > 1023) { - var i = 0; - - $('.alert-success.push').each(function () { - i++; - tops = 60 * i + 95; - - $(this).css({ - 'position': 'fixed', - 'z-index': 3, - 'right': '10px', - 'top': -100, - }).delay(1000).animate({ - 'top': tops, - }).delay(3000).animate({ - 'top': -100, - }); - }); - } - - // Nascondo la notifica se passo sopra col mouse - $('.alert-success.push').on('mouseover', function () { - $(this).stop().animate({ - 'top': -100, - 'opacity': 0 - }); - }); -}); diff --git a/assets/src/js/functions/functions.js b/assets/src/js/functions/functions.js index 70b34e15c..9724652fa 100644 --- a/assets/src/js/functions/functions.js +++ b/assets/src/js/functions/functions.js @@ -480,3 +480,33 @@ function restart_inputs() { autosize($('.autosize')); } +function alertPush() { + // Messaggio di avviso salvataggio a comparsa sulla destra solo nella versione a desktop intero + if ($(window).width() > 1023) { + var i = 0; + + $('.alert-success.push').each(function () { + i++; + tops = 60 * i + 95; + + $(this).css({ + 'position': 'fixed', + 'z-index': 3, + 'right': '10px', + 'top': -100, + }).delay(1000).animate({ + 'top': tops, + }).delay(3000).animate({ + 'top': -100, + }); + }); + } + + // Nascondo la notifica se passo sopra col mouse + $('.alert-success.push').on('mouseover', function () { + $(this).stop().animate({ + 'top': -100, + 'opacity': 0 + }); + }); +} diff --git a/include/bottom.php b/include/bottom.php index 6489c0617..f847b806f 100644 --- a/include/bottom.php +++ b/include/bottom.php @@ -53,6 +53,8 @@ if (Auth::check()) { echo '