Fix refresh
This commit is contained in:
parent
537f32ab8b
commit
916c7af738
@ -81,7 +81,11 @@ class ContestsController < ApplicationController
|
||||
filter_contestants_per_category
|
||||
@puzzles = @contest.puzzles.order(:id)
|
||||
@action_name = t("helpers.buttons.refresh")
|
||||
@action_path = "/public/#{@contest.friendly_id}"
|
||||
if params.key?(:category)
|
||||
@action_path = "/public/#{@contest.friendly_id}?category=#{params[:category]}"
|
||||
else
|
||||
@action_path = "/public/#{@contest.friendly_id}"
|
||||
end
|
||||
render :scoreboard
|
||||
end
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
javascript:
|
||||
function refresh() {
|
||||
const el = document.querySelector('input[type="checkbox"]');
|
||||
if (el.checked) location.replace("/public/#{@contest.friendly_id}?refresh=1")
|
||||
setTimeout(refresh, 5000);
|
||||
}
|
||||
|
||||
css:
|
||||
@media (max-width: 800px) {
|
||||
a.btn { display: none; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user