diff --git a/scores/templates/scores/brackets.html b/scores/templates/scores/brackets.html index f13b674..68da90f 100644 --- a/scores/templates/scores/brackets.html +++ b/scores/templates/scores/brackets.html @@ -22,7 +22,7 @@ {% if tv %} + {% endif %} {% if tournament.club.header %} diff --git a/scores/templates/scores/teams.html b/scores/templates/scores/teams.html index 7619319..48b9f89 100644 --- a/scores/templates/scores/teams.html +++ b/scores/templates/scores/teams.html @@ -26,7 +26,7 @@ {% if tv %} + {% endif %} {% if tournament.club.header %} diff --git a/scores/templates/scores/tournament.html b/scores/templates/scores/tournament.html index 3773491..74c052b 100644 --- a/scores/templates/scores/tournament.html +++ b/scores/templates/scores/tournament.html @@ -22,38 +22,39 @@ {% if tv %} + var iInterval = 4000; + 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).scrollTop(0); + window.location.reload(); + }, iInterval); + } + }); + }; + setTimeout(loop, iInterval); + {% endif %} {% if tournament.club.header %}