Fix alert versione push

This commit is contained in:
Thomas Zilio 2019-07-30 17:03:04 +02:00
parent a17511f745
commit f77dbf5c99
3 changed files with 32 additions and 30 deletions

View File

@ -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
});
});
});

View File

@ -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
});
});
}

View File

@ -53,6 +53,8 @@ if (Auth::check()) {
echo '
<script>
$(document).ready(function() {
alertPush();
$.ajax({
url: globals.rootdir + "/ajax.php",
type: "get",