add simpledatatables

This commit is contained in:
Cayo Puigdefabregas 2022-11-23 16:13:30 +01:00
parent a9504b0b71
commit 1efc650bea
1 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,7 @@
<div class="dataTable-search"> <div class="dataTable-search">
</div> </div>
</div> </div>
<div class="dataTable-container">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -225,6 +226,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
<div class="dataTable-bottom"> <div class="dataTable-bottom">
@ -317,6 +319,12 @@
}); });
}); });
</script> </script>
<script>
let table = new simpleDatatables.DataTable("table", {
perPageSelect: [5, 10, 15, 20, 25, 50, 100],
perPage: 20
})
</script>
{% if config['DEBUG'] %} {% if config['DEBUG'] %}
<script src="{{ url_for('static', filename='js/main_inventory.js') }}"></script> <script src="{{ url_for('static', filename='js/main_inventory.js') }}"></script>