From 263b90599cece9677cf2c024d16455d392613b61 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 1 Apr 2020 14:04:59 -0700 Subject: [PATCH] Click through to book pages for no javascript --- fedireads/static/js/shared.js | 3 ++- fedireads/templates/snippets/covers_shelf.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fedireads/static/js/shared.js b/fedireads/static/js/shared.js index c63e44ca..1859c4af 100644 --- a/fedireads/static/js/shared.js +++ b/fedireads/static/js/shared.js @@ -1,4 +1,5 @@ -function show_compose(element) { +function show_compose(element, e) { + e.preventDefault(); var visible_compose_boxes = document.getElementsByClassName('visible'); for (var i = 0; i < visible_compose_boxes.length; i++) { visible_compose_boxes[i].className = 'compose-suggestion'; diff --git a/fedireads/templates/snippets/covers_shelf.html b/fedireads/templates/snippets/covers_shelf.html index feddbfa7..d6a8b880 100644 --- a/fedireads/templates/snippets/covers_shelf.html +++ b/fedireads/templates/snippets/covers_shelf.html @@ -11,8 +11,8 @@
{% for book in shelf.books %} -
- {% include 'snippets/book_cover.html' with book=book %} +
+ {% include 'snippets/book_cover.html' with book=book %} {% include 'snippets/shelve_button.html' with book=book %}
{% endfor %}