diff options
author | David Gay <david@davidgay.org> | 2021-05-04 17:55:28 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-04 17:57:12 -0400 |
commit | 73744a9c6840fb0ba6f285ca81f9fba75ec22d5f (patch) | |
tree | 837333e9e46c5ccc6cf50214a94c2b9b6d0bb7f3 /app/views/game | |
parent | dddbf75428477f5e073584939d098e55d6324be3 (diff) |
Initial draft of timer setup, with results outputting and items being awarded
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") %>" +} |