mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Enable printing of multiple stock location labels
This commit is contained in:
parent
412b05d76c
commit
38eea21f4f
@ -18,10 +18,18 @@
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-location'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
<!-- Printing actions menu -->
|
||||
<div class='btn-group'>
|
||||
<button id='location-print-options' class='btn btn-primary dropdown-toggle' type='button' data-toggle="dropdown" title='{% trans "Printing Actions" %}'>
|
||||
<span class='fas fa-print'></span> <span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><a href='#' id='multi-location-print-label' title='{% trans "Print labels" %}'><span class='fas fa-tags'></span> {% trans "Print labels" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-location'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='sublocation-table'></table>
|
||||
@ -42,4 +50,24 @@ loadStockLocationTable($('#sublocation-table'), {
|
||||
}
|
||||
});
|
||||
|
||||
linkButtonsToSelection(
|
||||
$('#sublocation-table'),
|
||||
[
|
||||
'#location-print-options',
|
||||
]
|
||||
);
|
||||
|
||||
$('#multi-location-print-label').click(function() {
|
||||
|
||||
var selections = $('#sublocation-table').bootstrapTable('getSelections');
|
||||
|
||||
var locations = [];
|
||||
|
||||
selections.forEach(function(loc) {
|
||||
locations.push(loc.pk);
|
||||
});
|
||||
|
||||
printStockLocationLabels(locations);
|
||||
})
|
||||
|
||||
{% endblock %}
|
@ -32,6 +32,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Printing actions menu -->
|
||||
<div class='btn-group'>
|
||||
<button id='stock-print-options' class='btn btn-primary dropdown-toggle' type='button' data-toggle="dropdown" title='{% trans "Printing Actions" %}'>
|
||||
<span class='fas fa-print'></span> <span class='caret'></span>
|
||||
|
Loading…
Reference in New Issue
Block a user