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,12 +18,20 @@
|
|||||||
|
|
||||||
<div id='button-toolbar'>
|
<div id='button-toolbar'>
|
||||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||||
|
<!-- 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>
|
||||||
<div class='filter-list' id='filter-list-location'>
|
<div class='filter-list' id='filter-list-location'>
|
||||||
<!-- An empty div in which the filter list will be constructed -->
|
<!-- An empty div in which the filter list will be constructed -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='sublocation-table'></table>
|
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='sublocation-table'></table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -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 %}
|
{% endblock %}
|
@ -32,6 +32,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<!-- Printing actions menu -->
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button id='stock-print-options' class='btn btn-primary dropdown-toggle' type='button' data-toggle="dropdown" title='{% trans "Printing Actions" %}'>
|
<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>
|
<span class='fas fa-print'></span> <span class='caret'></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user