mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix action buttons in "part" table on category page
This commit is contained in:
parent
e1fbd961e5
commit
e225d3b765
@ -169,13 +169,18 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class='dropdown-menu'>
|
<ul class='dropdown-menu'>
|
||||||
{% if roles.part.change %}
|
{% if roles.part.change %}
|
||||||
<li><a class='dropdown-item' href='#' id='multi-part-category' title='{% trans "Set category" %}'>{% trans "Set Category" %}</a></li>
|
<li><a class='dropdown-item' href='#' id='multi-part-category' title='{% trans "Set category" %}'>
|
||||||
|
<span class='fas fa-sitemap'></span> {% trans "Set Category" %}
|
||||||
|
</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a class='dropdown-item' href='#' id='multi-part-order' title='{% trans "Order parts" %}'>{% trans "Order Parts" %}</a></li>
|
<li><a class='dropdown-item' href='#' id='multi-part-order' title='{% trans "Order parts" %}'>
|
||||||
|
<span class='fas fa-shopping-cart'></span> {% trans "Order Parts" %}
|
||||||
|
</a></li>
|
||||||
{% if report_enabled %}
|
{% if report_enabled %}
|
||||||
<li><a class='dropdown-item' href='#' id='multi-part-print-label' title='{% trans "Print Labels" %}'>{% trans "Print Labels" %}</a></li>
|
<li><a class='dropdown-item' href='#' id='multi-part-print-label' title='{% trans "Print Labels" %}'>
|
||||||
|
<span class='fas fa-tag'></span> {% trans "Print Labels" %}
|
||||||
|
</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a class='dropdown-item' href='#' id='multi-part-export' title='{% trans "Export" %}'>{% trans "Export Data" %}</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% include "filter_list.html" with id="parts" %}
|
{% include "filter_list.html" with id="parts" %}
|
||||||
|
@ -481,7 +481,7 @@ function orderParts(parts_list, options={}) {
|
|||||||
var thumb = thumbnailImage(part.thumbnail || part.image);
|
var thumb = thumbnailImage(part.thumbnail || part.image);
|
||||||
|
|
||||||
// The "quantity" field should have been provided for each part
|
// The "quantity" field should have been provided for each part
|
||||||
var quantity = part.quantity || 0;
|
var quantity = part.quantity || 1;
|
||||||
|
|
||||||
if (quantity < 0) {
|
if (quantity < 0) {
|
||||||
quantity = 0;
|
quantity = 0;
|
||||||
|
@ -1581,19 +1581,6 @@ function loadPartTable(table, url, options={}) {
|
|||||||
|
|
||||||
printPartLabels(items);
|
printPartLabels(items);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#multi-part-export').click(function() {
|
|
||||||
var selections = $(table).bootstrapTable('getSelections');
|
|
||||||
|
|
||||||
var parts = '';
|
|
||||||
|
|
||||||
selections.forEach(function(item) {
|
|
||||||
parts += item.pk;
|
|
||||||
parts += ',';
|
|
||||||
});
|
|
||||||
|
|
||||||
location.href = '/part/export/?parts=' + parts;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user