Fix search result tables

This commit is contained in:
Oliver Walters 2020-04-16 21:33:35 +10:00
parent 539b000460
commit 7ab58f683f
3 changed files with 32 additions and 25 deletions

View File

@ -137,29 +137,30 @@
$("#cat-create").click(function() {
launchModalForm(
"{% url 'category-create' %}",
{
follow: true,
{% if category %}
data: {
category: {{ category.id }}
},
{% endif %}
secondary: [
{
field: 'default_location',
label: 'New Location',
title: 'Create new location',
url: "{% url 'stock-location-create' %}",
},
{
field: 'parent',
label: 'New Category',
title: 'Create new category',
url: "{% url 'category-create' %}",
},
]
});
"{% url 'category-create' %}",
{
follow: true,
{% if category %}
data: {
category: {{ category.id }}
},
{% endif %}
secondary: [
{
field: 'default_location',
label: 'New Location',
title: 'Create new location',
url: "{% url 'stock-location-create' %}",
},
{
field: 'parent',
label: 'New Category',
title: 'Create new category',
url: "{% url 'category-create' %}",
},
]
}
);
})
$("#part-export").click(function() {

View File

@ -127,7 +127,7 @@ InvenTree | {% trans "Search Results" %}
loadPartTable("#part-results-table",
"{% url 'api-part-list' %}",
{
query: {
params: {
search: "{{ query }}",
},
allowInactive: true,
@ -137,7 +137,7 @@ InvenTree | {% trans "Search Results" %}
loadCompanyTable('#company-results-table', "{% url 'api-company-list' %}", {
params: {
serach: "{{ query }}",
search: "{{ query }}",
}
});

View File

@ -9,6 +9,12 @@
{% endblock %}
{% block collapse_content %}
<div id='button-toolbar'>
<div class='button-toolbar container-fluid' style='float: right;'>
<div class='filter-list' id='filter-list-parts'></div>
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar="#button-toolbar" id='part-results-table'>
</table>
{% endblock %}