use full width, fix wrapping in sub book notes and title fields and fix-up button sizes on book edit

This commit is contained in:
2022-07-03 21:25:33 +10:00
parent 1c01e2007e
commit 045be5eebe
3 changed files with 10 additions and 12 deletions

7
BUGs
View File

@@ -1,10 +1,7 @@
### fix to get this working with bs 5... ### fix to get this working with bs 5...
editing a book needs to use input groups editing a book needs to use input groups
+ buttons (add/rem say authors) is in wrong spot +/- buttons (add/rem say authors) are in wrong spot / input-group
- buttons at bottom are broken still * buttons at bottom are broken still
edit series needs input groups
sub-books table looks off (notes/etc. not stretching full width)
even navbar is not inset from left-margin (see pa-dev)
get rid of font-awesome and use bootstrap5 icons get rid of font-awesome and use bootstrap5 icons
sort through dataTables calls in books_for_series.html (ever called without base?) -- Maybe as part of an ajax call? sort through dataTables calls in books_for_series.html (ever called without base?) -- Maybe as part of an ajax call?

View File

@@ -198,9 +198,9 @@ function AddAuthorToBook(num) {
{% set keys = [ 'title', 'author', 'publisher', 'genre', 'owned', 'covertype', 'condition', 'year_published', 'rating', 'notes', 'blurb' ] %} {% set keys = [ 'title', 'author', 'publisher', 'genre', 'owned', 'covertype', 'condition', 'year_published', 'rating', 'notes', 'blurb' ] %}
<div class="container-fluid"> <div class="container-fluid">
<div class="form-row col-10"><h3 class="offset-2">{{page_title}}</h3></div> <div class="form-row"><h3 class="offset-2">{{page_title}}</h3></div>
<div class="row" id="main-row"> <div class="row" id="main-row">
<form role="form" class="form col-10" action="" method="POST"> <form role="form" class="form" action="" method="POST">
{{ book_form.id }} {{ book_form.id }}
{{ book_form.csrf_token }} {{ book_form.csrf_token }}
{% if b.parent|length %} {% if b.parent|length %}
@@ -376,7 +376,7 @@ function AddAuthorToBook(num) {
{% else %} {% else %}
<span class="col-2" tabindex="0" data-toggle="tooltip" <span class="col-2" tabindex="0" data-toggle="tooltip"
title="Cannot Delete unless the book is saved as Sold"> title="Cannot Delete unless the book is saved as Sold">
{{ book_form.delete( class="btn btn-outline-danger col disabled", disabled="true", style="pointer-events: none;" )}} {{ book_form.delete( class="btn btn-outline-danger col-2 disabled", disabled="true", style="pointer-events: none;" )}}
</span> </span>
{% endif %} {% endif %}
{% endif %} {% endif %}
@@ -403,18 +403,19 @@ function AddAuthorToBook(num) {
{% if 'Edit' in page_title %} {% if 'Edit' in page_title %}
<div class="form-row"> <div class="form-row">
{% if b.parent|length == 0 %} {% if b.parent|length == 0 %}
<form role="form" class="form col-10" action="{{url_for('new_book')}}" method="POST"> <form role="form" class="form" action="{{url_for('new_book')}}" method="POST">
<input type="hidden" name="add_sub_parent_id" value="{{books.id}}"> <input type="hidden" name="add_sub_parent_id" value="{{books.id}}">
{{ book_form.add_sub( class="btn btn-outline-success offset-2 col-2" )}} {{ book_form.add_sub( class="btn btn-outline-success offset-2 col-2" )}}
</form> </form>
{% else %} {% else %}
<form role="form" class="form col-10" action="{{url_for('remove_sub_book')}}" method="POST"> <form role="form" class="form" action="{{url_for('remove_sub_book')}}" method="POST">
<input type="hidden" name="rem_sub_sub_book_id" value="{{books.id}}"> <input type="hidden" name="rem_sub_sub_book_id" value="{{books.id}}">
<input type="hidden" name="rem_sub_parent_id" value="{{b.parent[0].id}}"> <input type="hidden" name="rem_sub_parent_id" value="{{b.parent[0].id}}">
{{ book_form.rem_sub( class="btn btn-outline-danger offset-2 col-3" )}} {{ book_form.rem_sub( class="btn btn-outline-danger offset-2 col-3" )}}
</form> </form>
{% endif %} {% endif %}
</div class="form-row"> </div class="form-row">
</div class="row" id="main-row">
{% endif %} {% endif %}
</div class="container"> </div class="container">

View File

@@ -5,7 +5,7 @@
<tbody> <tbody>
{% for book in sub_books %} {% for book in sub_books %}
<tr> <tr>
<td> <td style="white-space: nowrap;">
{% set state="" %} {% set state="" %}
{% if loop.index == 1 %} {% if loop.index == 1 %}
{% set state="disabled" %} {% set state="disabled" %}
@@ -33,7 +33,7 @@
<a href="/book/{{book.sub_book_id}}">{{book.title}}</a> <a href="/book/{{book.sub_book_id}}">{{book.title}}</a>
</td> </td>
<td>{{book.rating}}</td><td>{{book.author}}</td><td>{{book.year_published}}</td> <td>{{book.rating}}</td><td>{{book.author}}</td><td>{{book.year_published}}</td>
<td style="width: auto;min-width:0;max-width:650px;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;">{{book.notes}}</td> <td style="width: auto;min-width:0;max-width:600px;text-overflow: ellipsis; overflow: hidden;white-space: nowrap;">{{book.notes}}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>