Refactorin'

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

No files matched your search

@@ -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() {
+1 -6
View File
@@ -831,12 +831,7 @@
],
url: "{% url 'api-stock-list' %}",
});
$("#stock-export").click(function() {
downloadTableData($("#stock-table"));
});
$('#item-create').click(function () {
createNewStockItem({
data: {