fix auto scroll

main
Razmig Sarkissian 2 years ago
parent 53db1b955d
commit 169068362a
  1. 15
      scores/templates/scores/brackets.html
  2. 17
      scores/templates/scores/ranks.html
  3. 17
      scores/templates/scores/teams.html
  4. 73
      scores/templates/scores/tournament.html

@ -32,14 +32,6 @@
} else {
iScrollInterval = iScroll * 10;
}
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() {
var iScroll = $(document).height() - $(window).height();
@ -54,12 +46,11 @@
duration : iScrollInterval,
easing : "linear",
complete : function() {
setTimeout(fade, iInterval);
setTimeout(function(){
window.location.reload();
}, iInterval);
}
});
setTimeout(function(){
window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000));
};
setTimeout(loop, iInterval);
</script>

@ -15,7 +15,7 @@
<title>Padel</title>
</head>
{% if tv %}
<div class="wrapper" style="zoom:200%">
<div class="wrapper" style="zoom:125%">
{% else %}
<div class="wrapper">
{% endif %}
@ -33,14 +33,6 @@
} else {
iScrollInterval = iScroll * 10;
}
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() {
var iScroll = $(document).height() - $(window).height();
@ -55,12 +47,11 @@
duration : iScrollInterval,
easing : "linear",
complete : function() {
setTimeout(fade, iInterval);
setTimeout(function(){
window.location.reload();
}, iInterval);
}
});
setTimeout(function(){
window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000));
};
setTimeout(loop, iInterval);
</script>

@ -15,7 +15,7 @@
<title>Padel</title>
</head>
{% if tv %}
<div class="wrapper" style="zoom:200%">
<div class="wrapper" style="zoom:125%">
{% else %}
<div class="wrapper">
{% endif %}
@ -33,14 +33,6 @@
} else {
iScrollInterval = iScroll * 10;
}
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() {
var iScroll = $(document).height() - $(window).height();
@ -55,12 +47,11 @@
duration : iScrollInterval,
easing : "linear",
complete : function() {
setTimeout(fade, iInterval);
setTimeout(function(){
window.location.reload();
}, iInterval);
}
});
setTimeout(function(){
window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000));
};
setTimeout(loop, iInterval);
</script>

@ -22,47 +22,38 @@
{% if tv %}
<script>
var iInterval = 2000;
var iScrollInterval = 10000;
var iFadeInterval = 500;
var iScroll = $(document).height() - $(window).height();
if (iScroll * 10 + 4000 < 15000) {
iScrollInterval = 10000;
} else {
iScrollInterval = iScroll * 10;
}
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() {
var iScroll = $(document).height() - $(window).height();
if (iScroll * 10 + 4000 < 15000) {
iScrollInterval = 10000;
} else {
iScrollInterval = iScroll * 10;
}
$("html, body").animate({
scrollTop: iScroll
}, {
duration : iScrollInterval,
easing : "linear",
complete : function() {
setTimeout(fade, iInterval);
}
});
setTimeout(function(){
window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000));
};
setTimeout(loop, iInterval);
</script>
var iInterval = 2000;
var iScrollInterval = 10000;
var iFadeInterval = 500;
var iScroll = $(document).height() - $(window).height();
if (iScroll * 10 + 4000 < 15000) {
iScrollInterval = 10000;
} else {
iScrollInterval = iScroll * 10;
}
var loop = function() {
var iScroll = $(document).height() - $(window).height();
if (iScroll * 10 + 4000 < 15000) {
iScrollInterval = 10000;
} else {
iScrollInterval = iScroll * 10;
}
$("html, body").animate({
scrollTop: iScroll
}, {
duration : iScrollInterval,
easing : "linear",
complete : function() {
setTimeout(function(){
window.location.reload();
}, iInterval);
}
});
};
setTimeout(loop, iInterval);
</script>
{% endif %}
{% if tournament.club.header %}

Loading…
Cancel
Save