diff options
Diffstat (limited to 'app/views/game')
-rw-r--r-- | app/views/game/finish_activity.js.erb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/game/finish_activity.js.erb b/app/views/game/finish_activity.js.erb new file mode 100644 index 0000000..99d200c --- /dev/null +++ b/app/views/game/finish_activity.js.erb @@ -0,0 +1,12 @@ +var resultOutputDiv = document.getElementById("result_output"); +var resultControlsDiv = document.getElementById("result_controls"); + +var outputHTML = "<%= j render(partial: "activities/results", locals: { results: @results }) %>" + +if (resultOutputDiv) { + resultOutputDiv.innerHTML += outputHTML; +} + +if (resultControlsDiv) { + resultControlsDiv.innerHTML = "<%= j render(partial: "activities/timer") %>" +} |