summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-09-21 13:34:09 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-09-21 13:34:09 +0200
commitddff5b8afe18442ebea1e67bd6f77310b5bf9f0f (patch)
tree65d6121d2e2edceccda8edd05a933ca8e644dfe3
parent05b76ba874fa36724c9778c581b83f68a6f6fe1b (diff)
downloadnorsk-urskog-registrations-ddff5b8afe18442ebea1e67bd6f77310b5bf9f0f.tar.gz
norsk-urskog-registrations-ddff5b8afe18442ebea1e67bd6f77310b5bf9f0f.tar.bz2
norsk-urskog-registrations-ddff5b8afe18442ebea1e67bd6f77310b5bf9f0f.zip
Only show add song button if javascript enabled.
-rw-r--r--public/regform.js1
-rw-r--r--views/song.erb2
2 files changed, 2 insertions, 1 deletions
diff --git a/public/regform.js b/public/regform.js
index bcea7fa..332557d 100644
--- a/public/regform.js
+++ b/public/regform.js
@@ -4,6 +4,7 @@ document.addEventListener("DOMContentLoaded", function() {
};
for (let toggler of document.getElementsByClassName('add-song-button')) {
+ toggler.classList.remove('collapsed');
toggler.onclick = function() {
this.style.display = "none";
let n = toggler.dataset.songNumber;
diff --git a/views/song.erb b/views/song.erb
index 55cf921..f2495d3 100644
--- a/views/song.erb
+++ b/views/song.erb
@@ -1,7 +1,7 @@
<div class="song-info" id="song-<%= song_number %>-info">
<label>
Låt nr. <%= song_number %>
- <button type="button" class="add-song-button" data-song-number="<%= song_number %>">
+ <button type="button" class="add-song-button collapsed" data-song-number="<%= song_number %>">
Legg til...
</button>
</label>