2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Refactorin'

- Add the "download" button into the "filters" list
- Cuts down on boilerplate code
This commit is contained in:
Oliver
2022-03-03 21:16:27 +11:00
parent 85e9c4d3ca
commit ba406a4da9
9 changed files with 17 additions and 39 deletions

View File

@ -164,9 +164,6 @@
<div id='part-button-toolbar'>
<div class='btn-group' role='group'>
<div class='btn-group' role='group'>
<button id='part-export' class='btn btn-outline-secondary' type='button' title='{% trans "Export part data" %}'>
<span class='fas fa-file-download'></span>
</button>
<button id='part-options' class='btn btn-primary dropdown-toggle' type='button' data-bs-toggle="dropdown">
{% trans "Options" %}
</button>
@ -290,10 +287,6 @@
});
});
$("#part-export").click(function() {
downloadTableData($('#part-table'));
});
{% if roles.part.add %}
$("#part-create").click(function() {

View File

@ -831,12 +831,7 @@
],
url: "{% url 'api-stock-list' %}",
});
$("#stock-export").click(function() {
downloadTableData($("#stock-table"));
});
$('#item-create').click(function () {
createNewStockItem({
data: {