move buttons in books_for_series in series.html now are form buttons and submit and beginning of code to deal with it exists
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<form action="" method="POST">
|
||||
<table id="book_table" class="table table-striped table-sm small" data-toolbar="#toolbar" data-search="true">
|
||||
<thead>
|
||||
<tr class="thead-light"><th>Title</th><th>Book Number</th></tr>
|
||||
@@ -6,12 +7,14 @@
|
||||
{% set last = namespace(val=0) %}
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
<td>
|
||||
<td id="{{book.id}}">
|
||||
{% if book.parent_ref|length %}
|
||||
{% set style="visibility: hidden" %}
|
||||
{% set style="style=visibility:hidden" %}
|
||||
{% endif %}
|
||||
<a id="up-{{book.id}}" class="btn btn-outline-primary btn-small" style="{{style}}" href="#"><i class="fas fa-angle-double-up"></i></a>
|
||||
<a id="down-{{book.id}}" class="btn btn-outline-primary btn-small" style="{{style}}" href="#"><i class="fas fa-angle-double-down"></i></a>
|
||||
<button type="submit" name="move_button" value="up-{{book.id}}" id="up-{{book.id}}" class="btn btn-outline-primary btn-small" {{style}}>
|
||||
<i class="fas fa-angle-double-up"></i></button>
|
||||
<button type="submit" name="move_button" value="down-{{book.id}}" id="down-{{book.id}}" class="btn btn-outline-primary btn-small" {{style}}>
|
||||
<i class="fas fa-angle-double-down"></i></button>
|
||||
<a href="/book/{{book.id}}">{{book.title}}</a>
|
||||
</td>
|
||||
{% set num = SeriesBookNum( series.id, book.id ) %}
|
||||
@@ -50,14 +53,15 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#book_table').DataTable( {
|
||||
"paging": false, "searching": false, "info": false,
|
||||
"order": [[1, 'asc']],
|
||||
"columnDefs": [ { "type": "num", "targets": 1 } ] } );
|
||||
} );
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#book_table').DataTable( {
|
||||
"paging": false, "searching": false, "info": false,
|
||||
"order": [[1, 'asc']],
|
||||
"columnDefs": [ { "type": "num", "targets": 1 } ] } );
|
||||
} );
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user