forked from mirrors/bookwyrm
Click through to book pages for no javascript
This commit is contained in:
parent
c85eba53db
commit
263b90599c
2 changed files with 4 additions and 3 deletions
|
@ -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';
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
</h2>
|
||||
<div class="covers-shelf {{ shelf.identifier }}">
|
||||
{% for book in shelf.books %}
|
||||
<div class="book-preview" onclick="show_compose(this)" id="book-{{ book.id }}">
|
||||
{% include 'snippets/book_cover.html' with book=book %}
|
||||
<div class="book-preview" onclick="show_compose(this, event)" id="book-{{ book.id }}">
|
||||
<a href="{{ book.absolute_id }}">{% include 'snippets/book_cover.html' with book=book %}</a>
|
||||
{% include 'snippets/shelve_button.html' with book=book %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue