diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index 41d2e703..6ed72a4a 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -32,18 +32,9 @@ function rate_stars(e) { } function tabChange(e) { - e.preventDefault(); - var target = e.target.parentElement; + var target = e.target.parentElement.parentElement; var identifier = target.getAttribute('data-id'); - var options_class = target.getAttribute('data-category'); - var options = document.getElementsByClassName(options_class); - for (var i = 0; i < options.length; i++) { - if (!options[i].className.includes('hidden')) { - options[i].className += ' hidden'; - } - } - var tabs = target.parentElement.children; for (i = 0; i < tabs.length; i++) { if (tabs[i].getAttribute('data-id') == identifier) { @@ -54,7 +45,6 @@ function tabChange(e) { } var el = document.getElementById(identifier); - el.className = el.className.replace('hidden', ''); } function ajaxPost(form) { diff --git a/bookwyrm/templates/snippets/create_status.html b/bookwyrm/templates/snippets/create_status.html index ca68a26a..3ab7fbeb 100644 --- a/bookwyrm/templates/snippets/create_status.html +++ b/bookwyrm/templates/snippets/create_status.html @@ -4,13 +4,13 @@
@@ -22,32 +22,53 @@ {% endif %} -